Click or drag to resize

FilesUserRoutesUploadAsync Method (String, WriteMode, Boolean, NullableDateTime, Boolean, IEnumerablePropertyGroup, Boolean, Stream)

Create a new file with the contents provided in the request.

Do not use this to upload a file larger than 150 MB. Instead, create an upload session with UploadSessionStartAsync(UploadSessionStartArg, Stream).

Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.

Namespace:  Dropbox.Api.Files.Routes
Assembly:  Dropbox.Api (in Dropbox.Api.dll) Version: 5.0
public Task<FileMetadata> UploadAsync(
	string path,
	WriteMode mode = null,
	bool autorename = false,
	Nullable<DateTime> clientModified = null,
	bool mute = false,
	IEnumerable<PropertyGroup> propertyGroups = null,
	bool strictConflict = false,
	Stream body = null


Type: SystemString
Path in the user's Dropbox to save the file.
mode (Optional)
Type: Dropbox.Api.FilesWriteMode
Selects what to do if the file already exists.
autorename (Optional)
Type: SystemBoolean
If there's a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict.
clientModified (Optional)
Type: SystemNullableDateTime
The value to store as the clientModified timestamp. Dropbox automatically records the time at which the file was written to the Dropbox servers. It can also record an additional timestamp, provided by Dropbox desktop clients, mobile clients, and API apps of when the file was actually created or modified.
mute (Optional)
Type: SystemBoolean
Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. If true, this tells the clients that this modification shouldn't result in a user notification.
propertyGroups (Optional)
Type: System.Collections.GenericIEnumerablePropertyGroup
List of custom properties to add to file.
strictConflict (Optional)
Type: SystemBoolean
Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = WriteModeUpdate and the given "rev" doesn't match the existing file's "rev", even if the existing file has been deleted.
body (Optional)
Type: System.IOStream
The document to upload

Return Value

Type: TaskFileMetadata
The task that represents the asynchronous send operation. The TResult parameter contains the response from the server.
See Also