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

SystemObject
  ParseParseFile

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

public class ParseFile

The ParseFile type exposes the following members.

Constructors

  NameDescription
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.
Top
Properties

  NameDescription
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.
Top
Methods

  NameDescription
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.)
Top
Examples

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

Reference