ParseFile is a local representation of a file that is saved to the Parse cloud.
Inheritance Hierarchy
ParseParseFile
Namespace: Parse
Assembly: Parse (in Parse.dll) Version: 1.5.5.0 (1.5.5.0)
Syntax
The ParseFile type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| ParseFile(String, Byte, String) |
Creates a new file from a byte array and a name.
| |
| ParseFile(String, Stream, String) |
Creates a new file from a stream and a name.
|
Properties
| Name | Description | |
|---|---|---|
| IsDirty |
Gets whether the file still needs to be saved.
| |
| MimeType |
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.
| |
| Name |
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.
| |
| Url |
Gets the url of the file. It is only available after you save the file or after
you get the file from a ParseObject.
|
Methods
| Name | Description | |
|---|---|---|
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| SaveAsync |
Saves the file to the Parse cloud.
| |
| SaveAsync(CancellationToken) |
Saves the file to the Parse cloud.
| |
| SaveAsync(IProgressParseUploadProgressEventArgs) |
Saves the file to the Parse cloud.
| |
| SaveAsync(IProgressParseUploadProgressEventArgs, CancellationToken) |
Saves the file to the Parse cloud.
| |
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
Examples
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