ParseFile ClassParse
ParseFile is a local representation of a file that is saved to the Parse cloud.
Inheritance Hierarchy


Namespace: Parse
Assembly: Parse (in Parse.dll) Version: (

public class ParseFile

The ParseFile type exposes the following members.


Public methodParseFile(String, Byte, String)
Creates a new file from a byte array and a name.
Public methodParseFile(String, Stream, String)
Creates a new file from a stream and a name.

Public propertyIsDirty
Gets whether the file still needs to be saved.
Public propertyMimeType
Gets the MIME type of the file. This is either passed in to the constructor or inferred from the file extension. "unknown/unknown" will be used if neither is available.
Public propertyName
Gets the name of the file. Before save is called, this is the filename given by the user. After save is called, that name gets prefixed with a unique identifier.
Public propertyUrl
Gets the url of the file. It is only available after you save the file or after you get the file from a ParseObject.

Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSaveAsync
Saves the file to the Parse cloud.
Public methodSaveAsync(CancellationToken)
Saves the file to the Parse cloud.
Public methodSaveAsync(IProgressParseUploadProgressEventArgs)
Saves the file to the Parse cloud.
Public methodSaveAsync(IProgressParseUploadProgressEventArgs, CancellationToken)
Saves the file to the Parse cloud.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)

The workflow is to construct a ParseFile with data and a filename, then save it and set it as a field on a ParseObject:
var file = new ParseFile("hello.txt",
    new MemoryStream(Encoding.UTF8.GetBytes("hello")));
await file.SaveAsync();
var obj = new ParseObject("TestObject");
obj["file"] = file;
await obj.SaveAsync();
See Also