DBFILESUserAuthRoutes
Objective-C
@interface DBFILESUserAuthRoutes : NSObject
Swift
class DBFILESUserAuthRoutes : NSObject
Routes for the Files namespace
-
An instance of the networking client that each route will use to submit a request.
Declaration
Objective-C
@property (nonatomic, readonly) id<DBTransportClient> _Nonnull client; -
Initializes the
DBFILESUserAuthRoutesnamespace container object with a networking client.Declaration
Objective-C
- (nonnull instancetype)init:(nonnull id<DBTransportClient>)client; -
Deprecated
alphaGetMetadata is deprecated. Use getMetadata.
DEPRECATED: Returns the metadata for a file or folder. This is an alpha endpoint compatible with the properties API. Note: Metadata for the root folder is unsupported.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESMetadata *, DBFILESAlphaGetMetadataError *> *) alphaGetMetadata:(nonnull NSString *)path;Swift
func alphaGetMetadata(_ path: String) -> DBRpcTask<DBFILESMetadata, DBFILESAlphaGetMetadataError>Return Value
Through the response callback, the caller will receive a
DBFILESMetadataobject on success or aDBFILESAlphaGetMetadataErrorobject on failure. -
-alphaGetMetadata:includeMediaInfo: includeDeleted: includeHasExplicitSharedMembers: includePropertyGroups: includePropertyTemplates: Deprecated
alphaGetMetadata is deprecated. Use getMetadata.
DEPRECATED: Returns the metadata for a file or folder. This is an alpha endpoint compatible with the properties API. Note: Metadata for the root folder is unsupported.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESMetadata *, DBFILESAlphaGetMetadataError *> *) alphaGetMetadata:(nonnull NSString *)path includeMediaInfo:(nullable NSNumber *)includeMediaInfo includeDeleted:(nullable NSNumber *)includeDeleted includeHasExplicitSharedMembers: (nullable NSNumber *)includeHasExplicitSharedMembers includePropertyGroups: (nullable DBFILEPROPERTIESTemplateFilterBase *) includePropertyGroups includePropertyTemplates: (nullable NSArray<NSString *> *)includePropertyTemplates;Swift
func alphaGetMetadata(_ path: String, includeMediaInfo: NSNumber?, includeDeleted: NSNumber?, includeHasExplicitSharedMembers: NSNumber?, includePropertyGroups: DBFILEPROPERTIESTemplateFilterBase?, includePropertyTemplates: [String]?) -> DBRpcTask<DBFILESMetadata, DBFILESAlphaGetMetadataError>Parameters
includePropertyTemplatesIf set to a valid list of template IDs,
propertyGroupsinDBFILESFileMetadatais set for files with custom properties.Return Value
Through the response callback, the caller will receive a
DBFILESMetadataobject on success or aDBFILESAlphaGetMetadataErrorobject on failure. -
Deprecated
alphaUpload is deprecated. Use upload.
DEPRECATED: Create a new file with the contents provided in the request. Note that the behavior of this alpha endpoint is unstable and subject to change. Do not use this to upload a file larger than 150 MB. Instead, create an upload session with
uploadSessionStart.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) alphaUploadUrl:(nonnull NSString *)path inputUrl:(nonnull NSString *)inputUrl;Swift
func alphaUploadUrl(_ path: String, inputUrl: String) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
-alphaUploadUrl:mode: autorename: clientModified: mute: propertyGroups: strictConflict: contentHash: inputUrl: Deprecated
alphaUpload is deprecated. Use upload.
DEPRECATED: Create a new file with the contents provided in the request. Note that the behavior of this alpha endpoint is unstable and subject to change. Do not use this to upload a file larger than 150 MB. Instead, create an upload session with
uploadSessionStart.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) alphaUploadUrl:(nonnull NSString *)path mode:(nullable DBFILESWriteMode *)mode autorename:(nullable NSNumber *)autorename clientModified:(nullable NSDate *)clientModified mute:(nullable NSNumber *)mute propertyGroups: (nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups strictConflict:(nullable NSNumber *)strictConflict contentHash:(nullable NSString *)contentHash inputUrl:(nonnull NSString *)inputUrl;Swift
func alphaUploadUrl(_ path: String, mode: DBFILESWriteMode?, autorename: NSNumber?, clientModified: Date?, mute: NSNumber?, propertyGroups: [DBFILEPROPERTIESPropertyGroup]?, strictConflict: NSNumber?, contentHash: String?, inputUrl: String) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
Deprecated
alphaUpload is deprecated. Use upload.
DEPRECATED: Create a new file with the contents provided in the request. Note that the behavior of this alpha endpoint is unstable and subject to change. Do not use this to upload a file larger than 150 MB. Instead, create an upload session with
uploadSessionStart.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) alphaUploadData:(nonnull NSString *)path inputData:(nonnull NSData *)inputData;Swift
func alphaUploadData(_ path: String, inputData: Data) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
-alphaUploadData:mode: autorename: clientModified: mute: propertyGroups: strictConflict: contentHash: inputData: Deprecated
alphaUpload is deprecated. Use upload.
DEPRECATED: Create a new file with the contents provided in the request. Note that the behavior of this alpha endpoint is unstable and subject to change. Do not use this to upload a file larger than 150 MB. Instead, create an upload session with
uploadSessionStart.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) alphaUploadData:(nonnull NSString *)path mode:(nullable DBFILESWriteMode *)mode autorename:(nullable NSNumber *)autorename clientModified:(nullable NSDate *)clientModified mute:(nullable NSNumber *)mute propertyGroups: (nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups strictConflict:(nullable NSNumber *)strictConflict contentHash:(nullable NSString *)contentHash inputData:(nonnull NSData *)inputData;Swift
func alphaUploadData(_ path: String, mode: DBFILESWriteMode?, autorename: NSNumber?, clientModified: Date?, mute: NSNumber?, propertyGroups: [DBFILEPROPERTIESPropertyGroup]?, strictConflict: NSNumber?, contentHash: String?, inputData: Data) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
Deprecated
alphaUpload is deprecated. Use upload.
DEPRECATED: Create a new file with the contents provided in the request. Note that the behavior of this alpha endpoint is unstable and subject to change. Do not use this to upload a file larger than 150 MB. Instead, create an upload session with
uploadSessionStart.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) alphaUploadStream:(nonnull NSString *)path inputStream:(nonnull NSInputStream *)inputStream;Swift
func alphaUploadStream(_ path: String, inputStream: InputStream) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
-alphaUploadStream:mode: autorename: clientModified: mute: propertyGroups: strictConflict: contentHash: inputStream: Deprecated
alphaUpload is deprecated. Use upload.
DEPRECATED: Create a new file with the contents provided in the request. Note that the behavior of this alpha endpoint is unstable and subject to change. Do not use this to upload a file larger than 150 MB. Instead, create an upload session with
uploadSessionStart.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) alphaUploadStream:(nonnull NSString *)path mode:(nullable DBFILESWriteMode *)mode autorename:(nullable NSNumber *)autorename clientModified:(nullable NSDate *)clientModified mute:(nullable NSNumber *)mute propertyGroups: (nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups strictConflict:(nullable NSNumber *)strictConflict contentHash:(nullable NSString *)contentHash inputStream:(nonnull NSInputStream *)inputStream;Swift
func alphaUploadStream(_ path: String, mode: DBFILESWriteMode?, autorename: NSNumber?, clientModified: Date?, mute: NSNumber?, propertyGroups: [DBFILEPROPERTIESPropertyGroup]?, strictConflict: NSNumber?, contentHash: String?, inputStream: InputStream) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
Copy a file or folder to a different location in the user’s Dropbox. If the source path is a folder all its contents will be copied.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationResult *, DBFILESRelocationError *> *) dCopyV2:(nonnull NSString *)fromPath toPath:(nonnull NSString *)toPath;Swift
func dCopyV2(_ fromPath: String, toPath: String) -> DBRpcTask<DBFILESRelocationResult, DBFILESRelocationError>Return Value
Through the response callback, the caller will receive a
DBFILESRelocationResultobject on success or aDBFILESRelocationErrorobject on failure. -
Copy a file or folder to a different location in the user’s Dropbox. If the source path is a folder all its contents will be copied.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationResult *, DBFILESRelocationError *> *) dCopyV2:(nonnull NSString *)fromPath toPath:(nonnull NSString *)toPath allowSharedFolder:(nullable NSNumber *)allowSharedFolder autorename:(nullable NSNumber *)autorename allowOwnershipTransfer:(nullable NSNumber *)allowOwnershipTransfer;Swift
func dCopyV2(_ fromPath: String, toPath: String, allowSharedFolder: NSNumber?, autorename: NSNumber?, allowOwnershipTransfer: NSNumber?) -> DBRpcTask<DBFILESRelocationResult, DBFILESRelocationError>Parameters
allowSharedFolderThis flag has no effect.
autorenameIf there’s a conflict, have the Dropbox server try to autorename the file to avoid the conflict.
allowOwnershipTransferAllow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationResultobject on success or aDBFILESRelocationErrorobject on failure. -
Deprecated
dCopy is deprecated. Use dCopy.
DEPRECATED: Copy a file or folder to a different location in the user’s Dropbox. If the source path is a folder all its contents will be copied.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESMetadata *, DBFILESRelocationError *> *) dCopy:(nonnull NSString *)fromPath toPath:(nonnull NSString *)toPath;Swift
func dCopy(_ fromPath: String, toPath: String) -> DBRpcTask<DBFILESMetadata, DBFILESRelocationError>Return Value
Through the response callback, the caller will receive a
DBFILESMetadataobject on success or aDBFILESRelocationErrorobject on failure. -
Deprecated
dCopy is deprecated. Use dCopy.
DEPRECATED: Copy a file or folder to a different location in the user’s Dropbox. If the source path is a folder all its contents will be copied.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESMetadata *, DBFILESRelocationError *> *) dCopy:(nonnull NSString *)fromPath toPath:(nonnull NSString *)toPath allowSharedFolder:(nullable NSNumber *)allowSharedFolder autorename:(nullable NSNumber *)autorename allowOwnershipTransfer:(nullable NSNumber *)allowOwnershipTransfer;Swift
func dCopy(_ fromPath: String, toPath: String, allowSharedFolder: NSNumber?, autorename: NSNumber?, allowOwnershipTransfer: NSNumber?) -> DBRpcTask<DBFILESMetadata, DBFILESRelocationError>Parameters
allowSharedFolderThis flag has no effect.
autorenameIf there’s a conflict, have the Dropbox server try to autorename the file to avoid the conflict.
allowOwnershipTransferAllow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.
Return Value
Through the response callback, the caller will receive a
DBFILESMetadataobject on success or aDBFILESRelocationErrorobject on failure. -
Copy multiple files or folders to different locations at once in the user’s Dropbox. This route will replace
dCopyBatch. The main difference is this route will return status for each entry, whiledCopyBatchraises failure if any entry fails. This route will either finish synchronously, or return a job ID and do the async copy job in background. Please usedCopyBatchCheckto check the job status.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchV2Launch *, DBNilObject *> *) dCopyBatchV2:(nonnull NSArray<DBFILESRelocationPath *> *)entries;Swift
func dCopyBatchV2(_ entries: [DBFILESRelocationPath]) -> DBRpcTask<DBFILESRelocationBatchV2Launch, DBNilObject>Parameters
entriesList of entries to be moved or copied. Each entry is RelocationPath.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchV2Launchobject on success or avoidobject on failure. -
Copy multiple files or folders to different locations at once in the user’s Dropbox. This route will replace
dCopyBatch. The main difference is this route will return status for each entry, whiledCopyBatchraises failure if any entry fails. This route will either finish synchronously, or return a job ID and do the async copy job in background. Please usedCopyBatchCheckto check the job status.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchV2Launch *, DBNilObject *> *) dCopyBatchV2:(nonnull NSArray<DBFILESRelocationPath *> *)entries autorename:(nullable NSNumber *)autorename;Swift
func dCopyBatchV2(_ entries: [DBFILESRelocationPath], autorename: NSNumber?) -> DBRpcTask<DBFILESRelocationBatchV2Launch, DBNilObject>Parameters
entriesList of entries to be moved or copied. Each entry is RelocationPath.
autorenameIf there’s a conflict with any file, have the Dropbox server try to autorename that file to avoid the conflict.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchV2Launchobject on success or avoidobject on failure. -
Deprecated
dCopyBatch is deprecated. Use dCopyBatch.
DEPRECATED: Copy multiple files or folders to different locations at once in the user’s Dropbox. This route will return job ID immediately and do the async copy job in background. Please use
dCopyBatchCheckto check the job status.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchLaunch *, DBNilObject *> *) dCopyBatch:(nonnull NSArray<DBFILESRelocationPath *> *)entries;Swift
func dCopyBatch(_ entries: [DBFILESRelocationPath]) -> DBRpcTask<DBFILESRelocationBatchLaunch, DBNilObject>Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchLaunchobject on success or avoidobject on failure. -
Deprecated
dCopyBatch is deprecated. Use dCopyBatch.
DEPRECATED: Copy multiple files or folders to different locations at once in the user’s Dropbox. This route will return job ID immediately and do the async copy job in background. Please use
dCopyBatchCheckto check the job status.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchLaunch *, DBNilObject *> *) dCopyBatch:(nonnull NSArray<DBFILESRelocationPath *> *)entries autorename:(nullable NSNumber *)autorename allowSharedFolder:(nullable NSNumber *)allowSharedFolder allowOwnershipTransfer:(nullable NSNumber *)allowOwnershipTransfer;Swift
func dCopyBatch(_ entries: [DBFILESRelocationPath], autorename: NSNumber?, allowSharedFolder: NSNumber?, allowOwnershipTransfer: NSNumber?) -> DBRpcTask<DBFILESRelocationBatchLaunch, DBNilObject>Parameters
allowSharedFolderThis flag has no effect.
allowOwnershipTransferAllow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchLaunchobject on success or avoidobject on failure. -
Returns the status of an asynchronous job for
dCopyBatch. It returns list of results for each entry.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchV2JobStatus *, DBASYNCPollError *> *) dCopyBatchCheckV2:(nonnull NSString *)asyncJobId;Swift
func dCopyBatchCheckV2(_ asyncJobId: String) -> DBRpcTask<DBFILESRelocationBatchV2JobStatus, DBASYNCPollError>Parameters
asyncJobIdId of the asynchronous job. This is the value of a response returned from the method that launched the job.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchV2JobStatusobject on success or aDBASYNCPollErrorobject on failure. -
Deprecated
dCopyBatchCheck is deprecated. Use dCopyBatchCheck.
DEPRECATED: Returns the status of an asynchronous job for
dCopyBatch. If success, it returns list of results for each entry.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchJobStatus *, DBASYNCPollError *> *) dCopyBatchCheck:(nonnull NSString *)asyncJobId;Swift
func dCopyBatchCheck(_ asyncJobId: String) -> DBRpcTask<DBFILESRelocationBatchJobStatus, DBASYNCPollError>Parameters
asyncJobIdId of the asynchronous job. This is the value of a response returned from the method that launched the job.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchJobStatusobject on success or aDBASYNCPollErrorobject on failure. -
Get a copy reference to a file or folder. This reference string can be used to save that file or folder to another user’s Dropbox by passing it to
dCopyReferenceSave.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESGetCopyReferenceResult *, DBFILESGetCopyReferenceError *> *)dCopyReferenceGet: (nonnull NSString *)path;Swift
func dCopyReferenceGet(_ path: String) -> DBRpcTask<DBFILESGetCopyReferenceResult, DBFILESGetCopyReferenceError>Parameters
pathThe path to the file or folder you want to get a copy reference to.
Return Value
Through the response callback, the caller will receive a
DBFILESGetCopyReferenceResultobject on success or aDBFILESGetCopyReferenceErrorobject on failure. -
Save a copy reference returned by
dCopyReferenceGetto the user’s Dropbox.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESSaveCopyReferenceResult *, DBFILESSaveCopyReferenceError *> *) dCopyReferenceSave:(nonnull NSString *)dCopyReference path:(nonnull NSString *)path;Swift
func dCopyReferenceSave(_ dCopyReference: String, path: String) -> DBRpcTask<DBFILESSaveCopyReferenceResult, DBFILESSaveCopyReferenceError>Parameters
dCopyReferenceA copy reference returned by
dCopyReferenceGet.pathPath in the user’s Dropbox that is the destination.
Return Value
Through the response callback, the caller will receive a
DBFILESSaveCopyReferenceResultobject on success or aDBFILESSaveCopyReferenceErrorobject on failure. -
Create a folder at a given path.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESCreateFolderResult *, DBFILESCreateFolderError *> *) createFolderV2:(nonnull NSString *)path;Swift
func createFolderV2(_ path: String) -> DBRpcTask<DBFILESCreateFolderResult, DBFILESCreateFolderError>Parameters
pathPath in the user’s Dropbox to create.
Return Value
Through the response callback, the caller will receive a
DBFILESCreateFolderResultobject on success or aDBFILESCreateFolderErrorobject on failure. -
Create a folder at a given path.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESCreateFolderResult *, DBFILESCreateFolderError *> *) createFolderV2:(nonnull NSString *)path autorename:(nullable NSNumber *)autorename;Swift
func createFolderV2(_ path: String, autorename: NSNumber?) -> DBRpcTask<DBFILESCreateFolderResult, DBFILESCreateFolderError>Parameters
pathPath in the user’s Dropbox to create.
autorenameIf there’s a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.
Return Value
Through the response callback, the caller will receive a
DBFILESCreateFolderResultobject on success or aDBFILESCreateFolderErrorobject on failure. -
Deprecated
createFolder is deprecated. Use createFolder.
DEPRECATED: Create a folder at a given path.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESFolderMetadata *, DBFILESCreateFolderError *> *) createFolder:(nonnull NSString *)path;Swift
func createFolder(_ path: String) -> DBRpcTask<DBFILESFolderMetadata, DBFILESCreateFolderError>Parameters
pathPath in the user’s Dropbox to create.
Return Value
Through the response callback, the caller will receive a
DBFILESFolderMetadataobject on success or aDBFILESCreateFolderErrorobject on failure. -
Deprecated
createFolder is deprecated. Use createFolder.
DEPRECATED: Create a folder at a given path.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESFolderMetadata *, DBFILESCreateFolderError *> *) createFolder:(nonnull NSString *)path autorename:(nullable NSNumber *)autorename;Swift
func createFolder(_ path: String, autorename: NSNumber?) -> DBRpcTask<DBFILESFolderMetadata, DBFILESCreateFolderError>Parameters
pathPath in the user’s Dropbox to create.
autorenameIf there’s a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.
Return Value
Through the response callback, the caller will receive a
DBFILESFolderMetadataobject on success or aDBFILESCreateFolderErrorobject on failure. -
Create multiple folders at once. This route is asynchronous for large batches, which returns a job ID immediately and runs the create folder batch asynchronously. Otherwise, creates the folders and returns the result synchronously for smaller inputs. You can force asynchronous behaviour by using the
forceAsyncinDBFILESCreateFolderBatchArgflag. UsecreateFolderBatchCheckto check the job status.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESCreateFolderBatchLaunch *, DBNilObject *> *) createFolderBatch:(nonnull NSArray<NSString *> *)paths;Swift
func createFolderBatch(_ paths: [String]) -> DBRpcTask<DBFILESCreateFolderBatchLaunch, DBNilObject>Parameters
pathsList of paths to be created in the user’s Dropbox. Duplicate path arguments in the batch are considered only once.
Return Value
Through the response callback, the caller will receive a
DBFILESCreateFolderBatchLaunchobject on success or avoidobject on failure. -
Create multiple folders at once. This route is asynchronous for large batches, which returns a job ID immediately and runs the create folder batch asynchronously. Otherwise, creates the folders and returns the result synchronously for smaller inputs. You can force asynchronous behaviour by using the
forceAsyncinDBFILESCreateFolderBatchArgflag. UsecreateFolderBatchCheckto check the job status.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESCreateFolderBatchLaunch *, DBNilObject *> *) createFolderBatch:(nonnull NSArray<NSString *> *)paths autorename:(nullable NSNumber *)autorename forceAsync:(nullable NSNumber *)forceAsync;Swift
func createFolderBatch(_ paths: [String], autorename: NSNumber?, forceAsync: NSNumber?) -> DBRpcTask<DBFILESCreateFolderBatchLaunch, DBNilObject>Parameters
pathsList of paths to be created in the user’s Dropbox. Duplicate path arguments in the batch are considered only once.
autorenameIf there’s a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.
forceAsyncWhether to force the create to happen asynchronously.
Return Value
Through the response callback, the caller will receive a
DBFILESCreateFolderBatchLaunchobject on success or avoidobject on failure. -
Returns the status of an asynchronous job for
createFolderBatch. If success, it returns list of result for each entry.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESCreateFolderBatchJobStatus *, DBASYNCPollError *> *) createFolderBatchCheck:(nonnull NSString *)asyncJobId;Swift
func createFolderBatchCheck(_ asyncJobId: String) -> DBRpcTask<DBFILESCreateFolderBatchJobStatus, DBASYNCPollError>Parameters
asyncJobIdId of the asynchronous job. This is the value of a response returned from the method that launched the job.
Return Value
Through the response callback, the caller will receive a
DBFILESCreateFolderBatchJobStatusobject on success or aDBASYNCPollErrorobject on failure. -
Delete the file or folder at a given path. If the path is a folder, all its contents will be deleted too. A successful response indicates that the file or folder was deleted. The returned metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of deletion, and not a DeletedMetadata object.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESDeleteResult *, DBFILESDeleteError *> *)delete_V2: (nonnull NSString *)path;Swift
func delete_V2(_ path: String) -> DBRpcTask<DBFILESDeleteResult, DBFILESDeleteError>Parameters
pathPath in the user’s Dropbox to delete.
Return Value
Through the response callback, the caller will receive a
DBFILESDeleteResultobject on success or aDBFILESDeleteErrorobject on failure. -
Delete the file or folder at a given path. If the path is a folder, all its contents will be deleted too. A successful response indicates that the file or folder was deleted. The returned metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of deletion, and not a DeletedMetadata object.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESDeleteResult *, DBFILESDeleteError *> *) delete_V2:(nonnull NSString *)path parentRev:(nullable NSString *)parentRev;Swift
func delete_V2(_ path: String, parentRev: String?) -> DBRpcTask<DBFILESDeleteResult, DBFILESDeleteError>Parameters
pathPath in the user’s Dropbox to delete.
parentRevPerform delete if given “rev” matches the existing file’s latest “rev”. This field does not support deleting a folder.
Return Value
Through the response callback, the caller will receive a
DBFILESDeleteResultobject on success or aDBFILESDeleteErrorobject on failure. -
Deprecated
delete_ is deprecated. Use delete_.
DEPRECATED: Delete the file or folder at a given path. If the path is a folder, all its contents will be deleted too. A successful response indicates that the file or folder was deleted. The returned metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of deletion, and not a DeletedMetadata object.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESMetadata *, DBFILESDeleteError *> *)delete_: (nonnull NSString *)path;Swift
func delete_(_ path: String) -> DBRpcTask<DBFILESMetadata, DBFILESDeleteError>Parameters
pathPath in the user’s Dropbox to delete.
Return Value
Through the response callback, the caller will receive a
DBFILESMetadataobject on success or aDBFILESDeleteErrorobject on failure. -
Deprecated
delete_ is deprecated. Use delete_.
DEPRECATED: Delete the file or folder at a given path. If the path is a folder, all its contents will be deleted too. A successful response indicates that the file or folder was deleted. The returned metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of deletion, and not a DeletedMetadata object.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESMetadata *, DBFILESDeleteError *> *) delete_:(nonnull NSString *)path parentRev:(nullable NSString *)parentRev;Swift
func delete_(_ path: String, parentRev: String?) -> DBRpcTask<DBFILESMetadata, DBFILESDeleteError>Parameters
pathPath in the user’s Dropbox to delete.
parentRevPerform delete if given “rev” matches the existing file’s latest “rev”. This field does not support deleting a folder.
Return Value
Through the response callback, the caller will receive a
DBFILESMetadataobject on success or aDBFILESDeleteErrorobject on failure. -
Delete multiple files/folders at once. This route is asynchronous, which returns a job ID immediately and runs the delete batch asynchronously. Use
deleteBatchCheckto check the job status.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESDeleteBatchLaunch *, DBNilObject *> *)deleteBatch: (nonnull NSArray<DBFILESDeleteArg *> *)entries;Swift
func deleteBatch(_ entries: [DBFILESDeleteArg]) -> DBRpcTask<DBFILESDeleteBatchLaunch, DBNilObject>Return Value
Through the response callback, the caller will receive a
DBFILESDeleteBatchLaunchobject on success or avoidobject on failure. -
Returns the status of an asynchronous job for
deleteBatch. If success, it returns list of result for each entry.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESDeleteBatchJobStatus *, DBASYNCPollError *> *) deleteBatchCheck:(nonnull NSString *)asyncJobId;Swift
func deleteBatchCheck(_ asyncJobId: String) -> DBRpcTask<DBFILESDeleteBatchJobStatus, DBASYNCPollError>Parameters
asyncJobIdId of the asynchronous job. This is the value of a response returned from the method that launched the job.
Return Value
Through the response callback, the caller will receive a
DBFILESDeleteBatchJobStatusobject on success or aDBASYNCPollErrorobject on failure. -
Download a file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESDownloadError *> *) downloadUrl:(nonnull NSString *)path overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func downloadUrl(_ path: String, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESDownloadError>Parameters
pathThe path of the file to download.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESDownloadErrorobject on failure. -
Download a file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESDownloadError *> *) downloadUrl:(nonnull NSString *)path rev:(nullable NSString *)rev overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func downloadUrl(_ path: String, rev: String?, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESDownloadError>Parameters
pathThe path of the file to download.
revPlease specify revision in path instead.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESDownloadErrorobject on failure. -
Download a file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESDownloadError *> *) downloadUrl:(nonnull NSString *)path overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func downloadUrl(_ path: String, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESDownloadError>Parameters
pathThe path of the file to download.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESDownloadErrorobject on failure. -
Download a file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESDownloadError *> *) downloadUrl:(nonnull NSString *)path rev:(nullable NSString *)rev overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func downloadUrl(_ path: String, rev: String?, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESDownloadError>Parameters
pathThe path of the file to download.
revPlease specify revision in path instead.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESDownloadErrorobject on failure. -
Download a file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESDownloadError *> *) downloadData:(nonnull NSString *)path;Swift
func downloadData(_ path: String) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESDownloadError>Parameters
pathThe path of the file to download.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESDownloadErrorobject on failure. -
Download a file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESDownloadError *> *) downloadData:(nonnull NSString *)path rev:(nullable NSString *)rev;Swift
func downloadData(_ path: String, rev: String?) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESDownloadError>Parameters
pathThe path of the file to download.
revPlease specify revision in path instead.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESDownloadErrorobject on failure. -
Download a file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESDownloadError *> *) downloadData:(nonnull NSString *)path byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func downloadData(_ path: String, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESDownloadError>Parameters
pathThe path of the file to download.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESDownloadErrorobject on failure. -
Download a file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESDownloadError *> *) downloadData:(nonnull NSString *)path rev:(nullable NSString *)rev byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func downloadData(_ path: String, rev: String?, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESDownloadError>Parameters
pathThe path of the file to download.
revPlease specify revision in path instead.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESDownloadErrorobject on failure. -
Download a folder from the user’s Dropbox, as a zip file. The folder must be less than 20 GB in size and any single file within must be less than 4 GB in size. The resulting zip must have fewer than 10,000 total file and folder entries, including the top level folder. The input cannot be a single file. Note: this endpoint does not support HTTP range requests.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESDownloadZipResult *, DBFILESDownloadZipError *> *) downloadZipUrl:(nonnull NSString *)path overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func downloadZipUrl(_ path: String, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESDownloadZipResult, DBFILESDownloadZipError>Parameters
pathThe path of the folder to download.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESDownloadZipResultobject on success or aDBFILESDownloadZipErrorobject on failure. -
Download a folder from the user’s Dropbox, as a zip file. The folder must be less than 20 GB in size and any single file within must be less than 4 GB in size. The resulting zip must have fewer than 10,000 total file and folder entries, including the top level folder. The input cannot be a single file. Note: this endpoint does not support HTTP range requests.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESDownloadZipResult *, DBFILESDownloadZipError *> *) downloadZipUrl:(nonnull NSString *)path overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func downloadZipUrl(_ path: String, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESDownloadZipResult, DBFILESDownloadZipError>Parameters
pathThe path of the folder to download.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESDownloadZipResultobject on success or aDBFILESDownloadZipErrorobject on failure. -
Download a folder from the user’s Dropbox, as a zip file. The folder must be less than 20 GB in size and any single file within must be less than 4 GB in size. The resulting zip must have fewer than 10,000 total file and folder entries, including the top level folder. The input cannot be a single file. Note: this endpoint does not support HTTP range requests.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESDownloadZipResult *, DBFILESDownloadZipError *> *)downloadZipData: (nonnull NSString *)path;Swift
func downloadZipData(_ path: String) -> DBDownloadDataTask<DBFILESDownloadZipResult, DBFILESDownloadZipError>Parameters
pathThe path of the folder to download.
Return Value
Through the response callback, the caller will receive a
DBFILESDownloadZipResultobject on success or aDBFILESDownloadZipErrorobject on failure. -
Download a folder from the user’s Dropbox, as a zip file. The folder must be less than 20 GB in size and any single file within must be less than 4 GB in size. The resulting zip must have fewer than 10,000 total file and folder entries, including the top level folder. The input cannot be a single file. Note: this endpoint does not support HTTP range requests.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESDownloadZipResult *, DBFILESDownloadZipError *> *) downloadZipData:(nonnull NSString *)path byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func downloadZipData(_ path: String, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESDownloadZipResult, DBFILESDownloadZipError>Parameters
pathThe path of the folder to download.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESDownloadZipResultobject on success or aDBFILESDownloadZipErrorobject on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadatainDBFILESExportResulthasexportAsinDBFILESExportInfopopulated.Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESExportResult *, DBFILESExportError *> *) exportUrl:(nonnull NSString *)path overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func exportUrl(_ path: String, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESExportResult, DBFILESExportError>Parameters
pathThe path of the file to be exported.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESExportResultobject on success or aDBFILESExportErrorobject on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadatainDBFILESExportResulthasexportAsinDBFILESExportInfopopulated.Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESExportResult *, DBFILESExportError *> *) exportUrl:(nonnull NSString *)path exportFormat:(nullable NSString *)exportFormat overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func exportUrl(_ path: String, exportFormat: String?, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESExportResult, DBFILESExportError>Parameters
pathThe path of the file to be exported.
exportFormatThe file format to which the file should be exported. This must be one of the formats listed in the file’s export_options returned by
getMetadata. If none is specified, the default format (specified in export_as in file metadata) will be used.overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESExportResultobject on success or aDBFILESExportErrorobject on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadatainDBFILESExportResulthasexportAsinDBFILESExportInfopopulated.Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESExportResult *, DBFILESExportError *> *) exportUrl:(nonnull NSString *)path overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func exportUrl(_ path: String, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESExportResult, DBFILESExportError>Parameters
pathThe path of the file to be exported.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESExportResultobject on success or aDBFILESExportErrorobject on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadatainDBFILESExportResulthasexportAsinDBFILESExportInfopopulated.Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESExportResult *, DBFILESExportError *> *) exportUrl:(nonnull NSString *)path exportFormat:(nullable NSString *)exportFormat overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func exportUrl(_ path: String, exportFormat: String?, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESExportResult, DBFILESExportError>Parameters
pathThe path of the file to be exported.
exportFormatThe file format to which the file should be exported. This must be one of the formats listed in the file’s export_options returned by
getMetadata. If none is specified, the default format (specified in export_as in file metadata) will be used.overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESExportResultobject on success or aDBFILESExportErrorobject on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadatainDBFILESExportResulthasexportAsinDBFILESExportInfopopulated.Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESExportResult *, DBFILESExportError *> *) exportData:(nonnull NSString *)path;Swift
func exportData(_ path: String) -> DBDownloadDataTask<DBFILESExportResult, DBFILESExportError>Parameters
pathThe path of the file to be exported.
Return Value
Through the response callback, the caller will receive a
DBFILESExportResultobject on success or aDBFILESExportErrorobject on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadatainDBFILESExportResulthasexportAsinDBFILESExportInfopopulated.Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESExportResult *, DBFILESExportError *> *) exportData:(nonnull NSString *)path exportFormat:(nullable NSString *)exportFormat;Swift
func exportData(_ path: String, exportFormat: String?) -> DBDownloadDataTask<DBFILESExportResult, DBFILESExportError>Parameters
pathThe path of the file to be exported.
exportFormatThe file format to which the file should be exported. This must be one of the formats listed in the file’s export_options returned by
getMetadata. If none is specified, the default format (specified in export_as in file metadata) will be used.Return Value
Through the response callback, the caller will receive a
DBFILESExportResultobject on success or aDBFILESExportErrorobject on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadatainDBFILESExportResulthasexportAsinDBFILESExportInfopopulated.Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESExportResult *, DBFILESExportError *> *) exportData:(nonnull NSString *)path byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func exportData(_ path: String, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESExportResult, DBFILESExportError>Parameters
pathThe path of the file to be exported.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESExportResultobject on success or aDBFILESExportErrorobject on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadatainDBFILESExportResulthasexportAsinDBFILESExportInfopopulated.Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESExportResult *, DBFILESExportError *> *) exportData:(nonnull NSString *)path exportFormat:(nullable NSString *)exportFormat byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func exportData(_ path: String, exportFormat: String?, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESExportResult, DBFILESExportError>Parameters
pathThe path of the file to be exported.
exportFormatThe file format to which the file should be exported. This must be one of the formats listed in the file’s export_options returned by
getMetadata. If none is specified, the default format (specified in export_as in file metadata) will be used.byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESExportResultobject on success or aDBFILESExportErrorobject on failure. -
Return the lock metadata for the given list of paths.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESLockFileBatchResult *, DBFILESLockFileError *> *) getFileLockBatch:(nonnull NSArray<DBFILESLockFileArg *> *)entries;Swift
func getFileLockBatch(_ entries: [DBFILESLockFileArg]) -> DBRpcTask<DBFILESLockFileBatchResult, DBFILESLockFileError>Parameters
entriesList of ‘entries’. Each ‘entry’ contains a path of the file which will be locked or queried. Duplicate path arguments in the batch are considered only once.
Return Value
Through the response callback, the caller will receive a
DBFILESLockFileBatchResultobject on success or aDBFILESLockFileErrorobject on failure. -
Returns the metadata for a file or folder. Note: Metadata for the root folder is unsupported.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESMetadata *, DBFILESGetMetadataError *> *) getMetadata:(nonnull NSString *)path;Swift
func getMetadata(_ path: String) -> DBRpcTask<DBFILESMetadata, DBFILESGetMetadataError>Parameters
pathThe path of a file or folder on Dropbox.
Return Value
Through the response callback, the caller will receive a
DBFILESMetadataobject on success or aDBFILESGetMetadataErrorobject on failure. -
Returns the metadata for a file or folder. Note: Metadata for the root folder is unsupported.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESMetadata *, DBFILESGetMetadataError *> *) getMetadata:(nonnull NSString *)path includeMediaInfo:(nullable NSNumber *)includeMediaInfo includeDeleted:(nullable NSNumber *)includeDeleted includeHasExplicitSharedMembers: (nullable NSNumber *)includeHasExplicitSharedMembers includePropertyGroups: (nullable DBFILEPROPERTIESTemplateFilterBase *) includePropertyGroups;Swift
func getMetadata(_ path: String, includeMediaInfo: NSNumber?, includeDeleted: NSNumber?, includeHasExplicitSharedMembers: NSNumber?, includePropertyGroups: DBFILEPROPERTIESTemplateFilterBase?) -> DBRpcTask<DBFILESMetadata, DBFILESGetMetadataError>Parameters
pathThe path of a file or folder on Dropbox.
includeMediaInfoIf true,
mediaInfoinDBFILESFileMetadatais set for photo and video.includeDeletedIf true, DeletedMetadata will be returned for deleted file or folder, otherwise
notFoundinDBFILESLookupErrorwill be returned.includeHasExplicitSharedMembersIf true, the results will include a flag for each file indicating whether or not that file has any explicit members.
includePropertyGroupsIf set to a valid list of template IDs,
propertyGroupsinDBFILESFileMetadatais set if there exists property data associated with the file and each of the listed templates.Return Value
Through the response callback, the caller will receive a
DBFILESMetadataobject on success or aDBFILESGetMetadataErrorobject on failure. -
Get a preview for a file. Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported extension error.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESPreviewError *> *) getPreviewUrl:(nonnull NSString *)path overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func getPreviewUrl(_ path: String, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESPreviewError>Parameters
pathThe path of the file to preview.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESPreviewErrorobject on failure. -
Get a preview for a file. Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported extension error.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESPreviewError *> *) getPreviewUrl:(nonnull NSString *)path rev:(nullable NSString *)rev overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func getPreviewUrl(_ path: String, rev: String?, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESPreviewError>Parameters
pathThe path of the file to preview.
revPlease specify revision in path instead.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESPreviewErrorobject on failure. -
Get a preview for a file. Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported extension error.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESPreviewError *> *) getPreviewUrl:(nonnull NSString *)path overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getPreviewUrl(_ path: String, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESPreviewError>Parameters
pathThe path of the file to preview.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESPreviewErrorobject on failure. -
Get a preview for a file. Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported extension error.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESPreviewError *> *) getPreviewUrl:(nonnull NSString *)path rev:(nullable NSString *)rev overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getPreviewUrl(_ path: String, rev: String?, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESPreviewError>Parameters
pathThe path of the file to preview.
revPlease specify revision in path instead.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESPreviewErrorobject on failure. -
Get a preview for a file. Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported extension error.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESPreviewError *> *) getPreviewData:(nonnull NSString *)path;Swift
func getPreviewData(_ path: String) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESPreviewError>Parameters
pathThe path of the file to preview.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESPreviewErrorobject on failure. -
Get a preview for a file. Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported extension error.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESPreviewError *> *) getPreviewData:(nonnull NSString *)path rev:(nullable NSString *)rev;Swift
func getPreviewData(_ path: String, rev: String?) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESPreviewError>Parameters
pathThe path of the file to preview.
revPlease specify revision in path instead.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESPreviewErrorobject on failure. -
Get a preview for a file. Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported extension error.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESPreviewError *> *) getPreviewData:(nonnull NSString *)path byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getPreviewData(_ path: String, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESPreviewError>Parameters
pathThe path of the file to preview.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESPreviewErrorobject on failure. -
Get a preview for a file. Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported extension error.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESPreviewError *> *) getPreviewData:(nonnull NSString *)path rev:(nullable NSString *)rev byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getPreviewData(_ path: String, rev: String?, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESPreviewError>Parameters
pathThe path of the file to preview.
revPlease specify revision in path instead.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESPreviewErrorobject on failure. -
Get a temporary link to stream content of a file. This link will expire in four hours and afterwards you will get 410 Gone. This URL should not be used to display content directly in the browser. The Content-Type of the link is determined automatically by the file’s mime type.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESGetTemporaryLinkResult *, DBFILESGetTemporaryLinkError *> *)getTemporaryLink: (nonnull NSString *)path;Swift
func getTemporaryLink(_ path: String) -> DBRpcTask<DBFILESGetTemporaryLinkResult, DBFILESGetTemporaryLinkError>Parameters
pathThe path to the file you want a temporary link to.
Return Value
Through the response callback, the caller will receive a
DBFILESGetTemporaryLinkResultobject on success or aDBFILESGetTemporaryLinkErrorobject on failure. -
Get a one-time use temporary upload link to upload a file to a Dropbox location. This endpoint acts as a delayed
upload. The returned temporary upload link may be used to make a POST request with the data to be uploaded. The upload will then be perfomed with the CommitInfo previously provided togetTemporaryUploadLinkbut evaluated only upon consumption. Hence, errors stemming from invalid CommitInfo with respect to the state of the user’s Dropbox will only be communicated at consumption time. Additionally, these errors are surfaced as generic HTTP 409 Conflict responses, potentially hiding issue details. The maximum temporary upload link duration is 4 hours. Upon consumption or expiration, a new link will have to be generated. Multiple links may exist for a specific upload path at any given time. The POST request on the temporary upload link must have its Content-Type set to “application/octet-stream”. Example temporary upload link consumption request: curl -X POST https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND –header “Content-Type: application/octet-stream” –data-binary @local_file.txt A successful temporary upload link consumption request returns the content hash of the uploaded data in JSON format. Example successful temporary upload link consumption response: {“content-hash”: “599d71033d700ac892a0e48fa61b125d2f5994”} An unsuccessful temporary upload link consumption request returns any of the following status codes: HTTP 400 Bad Request: Content-Type is not one of application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: The temporary upload link does not exist or is currently unavailable, the upload failed, or another error happened. HTTP 410 Gone: The temporary upload link is expired or consumed. Example unsuccessful temporary upload link consumption response: Temporary upload link has been recently consumed.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESGetTemporaryUploadLinkResult *, DBNilObject *> *) getTemporaryUploadLink:(nonnull DBFILESCommitInfo *)commitInfo;Swift
func getTemporaryUploadLink(_ commitInfo: DBFILESCommitInfo) -> DBRpcTask<DBFILESGetTemporaryUploadLinkResult, DBNilObject>Parameters
commitInfoContains the path and other optional modifiers for the future upload commit. Equivalent to the parameters provided to
upload.Return Value
Through the response callback, the caller will receive a
DBFILESGetTemporaryUploadLinkResultobject on success or avoidobject on failure. -
Get a one-time use temporary upload link to upload a file to a Dropbox location. This endpoint acts as a delayed
upload. The returned temporary upload link may be used to make a POST request with the data to be uploaded. The upload will then be perfomed with the CommitInfo previously provided togetTemporaryUploadLinkbut evaluated only upon consumption. Hence, errors stemming from invalid CommitInfo with respect to the state of the user’s Dropbox will only be communicated at consumption time. Additionally, these errors are surfaced as generic HTTP 409 Conflict responses, potentially hiding issue details. The maximum temporary upload link duration is 4 hours. Upon consumption or expiration, a new link will have to be generated. Multiple links may exist for a specific upload path at any given time. The POST request on the temporary upload link must have its Content-Type set to “application/octet-stream”. Example temporary upload link consumption request: curl -X POST https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND –header “Content-Type: application/octet-stream” –data-binary @local_file.txt A successful temporary upload link consumption request returns the content hash of the uploaded data in JSON format. Example successful temporary upload link consumption response: {“content-hash”: “599d71033d700ac892a0e48fa61b125d2f5994”} An unsuccessful temporary upload link consumption request returns any of the following status codes: HTTP 400 Bad Request: Content-Type is not one of application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: The temporary upload link does not exist or is currently unavailable, the upload failed, or another error happened. HTTP 410 Gone: The temporary upload link is expired or consumed. Example unsuccessful temporary upload link consumption response: Temporary upload link has been recently consumed.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESGetTemporaryUploadLinkResult *, DBNilObject *> *) getTemporaryUploadLink:(nonnull DBFILESCommitInfo *)commitInfo duration:(nullable NSNumber *)duration;Swift
func getTemporaryUploadLink(_ commitInfo: DBFILESCommitInfo, duration: NSNumber?) -> DBRpcTask<DBFILESGetTemporaryUploadLinkResult, DBNilObject>Parameters
commitInfoContains the path and other optional modifiers for the future upload commit. Equivalent to the parameters provided to
upload.durationHow long before this link expires, in seconds. Attempting to start an upload with this link longer than this period of time after link creation will result in an error.
Return Value
Through the response callback, the caller will receive a
DBFILESGetTemporaryUploadLinkResultobject on success or avoidobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESThumbnailError *> *) getThumbnailUrl:(nonnull NSString *)path overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func getThumbnailUrl(_ path: String, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESThumbnailError>Parameters
pathThe path to the image file you want to thumbnail.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESThumbnailErrorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESThumbnailError *> *) getThumbnailUrl:(nonnull NSString *)path format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func getThumbnailUrl(_ path: String, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESThumbnailError>Parameters
pathThe path to the image file you want to thumbnail.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESThumbnailErrorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESThumbnailError *> *) getThumbnailUrl:(nonnull NSString *)path overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailUrl(_ path: String, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESThumbnailError>Parameters
pathThe path to the image file you want to thumbnail.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESThumbnailErrorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESFileMetadata *, DBFILESThumbnailError *> *) getThumbnailUrl:(nonnull NSString *)path format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailUrl(_ path: String, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESFileMetadata, DBFILESThumbnailError>Parameters
pathThe path to the image file you want to thumbnail.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESThumbnailErrorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESThumbnailError *> *) getThumbnailData:(nonnull NSString *)path;Swift
func getThumbnailData(_ path: String) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESThumbnailError>Parameters
pathThe path to the image file you want to thumbnail.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESThumbnailErrorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESThumbnailError *> *) getThumbnailData:(nonnull NSString *)path format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode;Swift
func getThumbnailData(_ path: String, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESThumbnailError>Parameters
pathThe path to the image file you want to thumbnail.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESThumbnailErrorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESThumbnailError *> *) getThumbnailData:(nonnull NSString *)path byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailData(_ path: String, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESThumbnailError>Parameters
pathThe path to the image file you want to thumbnail.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESThumbnailErrorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESFileMetadata *, DBFILESThumbnailError *> *) getThumbnailData:(nonnull NSString *)path format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailData(_ path: String, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESFileMetadata, DBFILESThumbnailError>Parameters
pathThe path to the image file you want to thumbnail.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESThumbnailErrorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Url:(nonnull DBFILESPathOrLink *)resource overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func getThumbnailV2Url(_ resource: DBFILESPathOrLink, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Url:(nonnull DBFILESPathOrLink *)resource format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func getThumbnailV2Url(_ resource: DBFILESPathOrLink, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Url:(nonnull DBFILESPathOrLink *)resource overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailV2Url(_ resource: DBFILESPathOrLink, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Url:(nonnull DBFILESPathOrLink *)resource format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailV2Url(_ resource: DBFILESPathOrLink, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Data:(nonnull DBFILESPathOrLink *)resource;Swift
func getThumbnailV2Data(_ resource: DBFILESPathOrLink) -> DBDownloadDataTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Data:(nonnull DBFILESPathOrLink *)resource format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode;Swift
func getThumbnailV2Data(_ resource: DBFILESPathOrLink, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?) -> DBDownloadDataTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Data:(nonnull DBFILESPathOrLink *)resource byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailV2Data(_ resource: DBFILESPathOrLink, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. -
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Data:(nonnull DBFILESPathOrLink *)resource format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailV2Data(_ resource: DBFILESPathOrLink, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. -
Get thumbnails for a list of images. We allow up to 25 thumbnails in a single batch. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESGetThumbnailBatchResult *, DBFILESGetThumbnailBatchError *> *)getThumbnailBatch: (nonnull NSArray<DBFILESThumbnailArg *> *)entries;Swift
func getThumbnailBatch(_ entries: [DBFILESThumbnailArg]) -> DBRpcTask<DBFILESGetThumbnailBatchResult, DBFILESGetThumbnailBatchError>Parameters
entriesList of files to get thumbnails.
Return Value
Through the response callback, the caller will receive a
DBFILESGetThumbnailBatchResultobject on success or aDBFILESGetThumbnailBatchErrorobject on failure. -
Starts returning the contents of a folder. If the result’s
hasMoreinDBFILESListFolderResultfield is true, calllistFolderContinuewith the returnedcursorinDBFILESListFolderResultto retrieve more entries. If you’re usingrecursiveinDBFILESListFolderArgset to true to keep a local cache of the contents of a Dropbox account, iterate through each entry in order and process them as follows to keep your local state in sync: For each FileMetadata, store the new entry at the given path in your local state. If the required parent folders don’t exist yet, create them. If there’s already something else at the given path, replace it and remove all its children. For each FolderMetadata, store the new entry at the given path in your local state. If the required parent folders don’t exist yet, create them. If there’s already something else at the given path, replace it but leave the children as they are. Check the new entry’sreadOnlyinDBFILESFolderSharingInfoand set all its children’s read-only statuses to match. For each DeletedMetadata, if your local state has something at the given path, remove it and all its children. If there’s nothing at the given path, ignore this entry. Note: auth.RateLimitError may be returned if multiplelistFolderorlistFolderContinuecalls with same parameters are made simultaneously by same API app for same user. If your app implements retry logic, please hold off the retry until the previous request finishes.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListFolderResult *, DBFILESListFolderError *> *) listFolder:(nonnull NSString *)path;Swift
func listFolder(_ path: String) -> DBRpcTask<DBFILESListFolderResult, DBFILESListFolderError>Parameters
pathA unique identifier for the file.
Return Value
Through the response callback, the caller will receive a
DBFILESListFolderResultobject on success or aDBFILESListFolderErrorobject on failure. -
-listFolder:recursive: includeMediaInfo: includeDeleted: includeHasExplicitSharedMembers: includeMountedFolders: limit: sharedLink: includePropertyGroups: includeNonDownloadableFiles: Starts returning the contents of a folder. If the result’s
hasMoreinDBFILESListFolderResultfield is true, calllistFolderContinuewith the returnedcursorinDBFILESListFolderResultto retrieve more entries. If you’re usingrecursiveinDBFILESListFolderArgset to true to keep a local cache of the contents of a Dropbox account, iterate through each entry in order and process them as follows to keep your local state in sync: For each FileMetadata, store the new entry at the given path in your local state. If the required parent folders don’t exist yet, create them. If there’s already something else at the given path, replace it and remove all its children. For each FolderMetadata, store the new entry at the given path in your local state. If the required parent folders don’t exist yet, create them. If there’s already something else at the given path, replace it but leave the children as they are. Check the new entry’sreadOnlyinDBFILESFolderSharingInfoand set all its children’s read-only statuses to match. For each DeletedMetadata, if your local state has something at the given path, remove it and all its children. If there’s nothing at the given path, ignore this entry. Note: auth.RateLimitError may be returned if multiplelistFolderorlistFolderContinuecalls with same parameters are made simultaneously by same API app for same user. If your app implements retry logic, please hold off the retry until the previous request finishes.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListFolderResult *, DBFILESListFolderError *> *) listFolder:(nonnull NSString *)path recursive:(nullable NSNumber *)recursive includeMediaInfo:(nullable NSNumber *)includeMediaInfo includeDeleted:(nullable NSNumber *)includeDeleted includeHasExplicitSharedMembers: (nullable NSNumber *)includeHasExplicitSharedMembers includeMountedFolders:(nullable NSNumber *)includeMountedFolders limit:(nullable NSNumber *)limit sharedLink:(nullable DBFILESSharedLink *)sharedLink includePropertyGroups: (nullable DBFILEPROPERTIESTemplateFilterBase *) includePropertyGroups includeNonDownloadableFiles: (nullable NSNumber *)includeNonDownloadableFiles;Swift
func listFolder(_ path: String, recursive: NSNumber?, includeMediaInfo: NSNumber?, includeDeleted: NSNumber?, includeHasExplicitSharedMembers: NSNumber?, includeMountedFolders: NSNumber?, limit: NSNumber?, sharedLink: DBFILESSharedLink?, includePropertyGroups: DBFILEPROPERTIESTemplateFilterBase?, includeNonDownloadableFiles: NSNumber?) -> DBRpcTask<DBFILESListFolderResult, DBFILESListFolderError>Parameters
pathA unique identifier for the file.
recursiveIf true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders.
includeMediaInfoIf true,
mediaInfoinDBFILESFileMetadatais set for photo and video. This parameter will no longer have an effect starting December 2, 2019.includeDeletedIf true, the results will include entries for files and folders that used to exist but were deleted.
includeHasExplicitSharedMembersIf true, the results will include a flag for each file indicating whether or not that file has any explicit members.
includeMountedFoldersIf true, the results will include entries under mounted folders which includes app folder, shared folder and team folder.
limitThe maximum number of results to return per request. Note: This is an approximate number and there can be slightly more entries returned in some cases.
sharedLinkA shared link to list the contents of. If the link is password-protected, the password must be provided. If this field is present,
pathinDBFILESListFolderArgwill be relative to root of the shared link. Only non-recursive mode is supported for shared link.includePropertyGroupsIf set to a valid list of template IDs,
propertyGroupsinDBFILESFileMetadatais set if there exists property data associated with the file and each of the listed templates.includeNonDownloadableFilesIf true, include files that are not downloadable, i.e. Google Docs.
Return Value
Through the response callback, the caller will receive a
DBFILESListFolderResultobject on success or aDBFILESListFolderErrorobject on failure. -
Once a cursor has been retrieved from
listFolder, use this to paginate through all files and retrieve updates to the folder, following the same rules as documented forlistFolder.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListFolderResult *, DBFILESListFolderContinueError *> *)listFolderContinue: (nonnull NSString *)cursor;Swift
func listFolderContinue(_ cursor: String) -> DBRpcTask<DBFILESListFolderResult, DBFILESListFolderContinueError>Parameters
cursorThe cursor returned by your last call to
listFolderorlistFolderContinue.Return Value
Through the response callback, the caller will receive a
DBFILESListFolderResultobject on success or aDBFILESListFolderContinueErrorobject on failure. -
A way to quickly get a cursor for the folder’s state. Unlike
listFolder,listFolderGetLatestCursordoesn’t return any entries. This endpoint is for app which only needs to know about new files and modifications and doesn’t need to know about files that already exist in Dropbox.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListFolderGetLatestCursorResult *, DBFILESListFolderError *> *)listFolderGetLatestCursor: (nonnull NSString *)path;Swift
func listFolderGetLatestCursor(_ path: String) -> DBRpcTask<DBFILESListFolderGetLatestCursorResult, DBFILESListFolderError>Parameters
pathA unique identifier for the file.
Return Value
Through the response callback, the caller will receive a
DBFILESListFolderGetLatestCursorResultobject on success or aDBFILESListFolderErrorobject on failure. -
-listFolderGetLatestCursor:recursive: includeMediaInfo: includeDeleted: includeHasExplicitSharedMembers: includeMountedFolders: limit: sharedLink: includePropertyGroups: includeNonDownloadableFiles: A way to quickly get a cursor for the folder’s state. Unlike
listFolder,listFolderGetLatestCursordoesn’t return any entries. This endpoint is for app which only needs to know about new files and modifications and doesn’t need to know about files that already exist in Dropbox.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListFolderGetLatestCursorResult *, DBFILESListFolderError *> *) listFolderGetLatestCursor:(nonnull NSString *)path recursive:(nullable NSNumber *)recursive includeMediaInfo:(nullable NSNumber *)includeMediaInfo includeDeleted:(nullable NSNumber *)includeDeleted includeHasExplicitSharedMembers: (nullable NSNumber *)includeHasExplicitSharedMembers includeMountedFolders:(nullable NSNumber *)includeMountedFolders limit:(nullable NSNumber *)limit sharedLink:(nullable DBFILESSharedLink *)sharedLink includePropertyGroups: (nullable DBFILEPROPERTIESTemplateFilterBase *) includePropertyGroups includeNonDownloadableFiles: (nullable NSNumber *)includeNonDownloadableFiles;Swift
func listFolderGetLatestCursor(_ path: String, recursive: NSNumber?, includeMediaInfo: NSNumber?, includeDeleted: NSNumber?, includeHasExplicitSharedMembers: NSNumber?, includeMountedFolders: NSNumber?, limit: NSNumber?, sharedLink: DBFILESSharedLink?, includePropertyGroups: DBFILEPROPERTIESTemplateFilterBase?, includeNonDownloadableFiles: NSNumber?) -> DBRpcTask<DBFILESListFolderGetLatestCursorResult, DBFILESListFolderError>Parameters
pathA unique identifier for the file.
recursiveIf true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders.
includeMediaInfoIf true,
mediaInfoinDBFILESFileMetadatais set for photo and video. This parameter will no longer have an effect starting December 2, 2019.includeDeletedIf true, the results will include entries for files and folders that used to exist but were deleted.
includeHasExplicitSharedMembersIf true, the results will include a flag for each file indicating whether or not that file has any explicit members.
includeMountedFoldersIf true, the results will include entries under mounted folders which includes app folder, shared folder and team folder.
limitThe maximum number of results to return per request. Note: This is an approximate number and there can be slightly more entries returned in some cases.
sharedLinkA shared link to list the contents of. If the link is password-protected, the password must be provided. If this field is present,
pathinDBFILESListFolderArgwill be relative to root of the shared link. Only non-recursive mode is supported for shared link.includePropertyGroupsIf set to a valid list of template IDs,
propertyGroupsinDBFILESFileMetadatais set if there exists property data associated with the file and each of the listed templates.includeNonDownloadableFilesIf true, include files that are not downloadable, i.e. Google Docs.
Return Value
Through the response callback, the caller will receive a
DBFILESListFolderGetLatestCursorResultobject on success or aDBFILESListFolderErrorobject on failure. -
A longpoll endpoint to wait for changes on an account. In conjunction with
listFolderContinue, this call gives you a low-latency way to monitor an account for file changes. The connection will block until there are changes available or a timeout occurs. This endpoint is useful mostly for client-side apps. If you’re looking for server-side notifications, check out our webhooks documentation https://www.dropbox.com/developers/reference/webhooks.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListFolderLongpollResult *, DBFILESListFolderLongpollError *> *)listFolderLongpoll: (nonnull NSString *)cursor;Swift
func listFolderLongpoll(_ cursor: String) -> DBRpcTask<DBFILESListFolderLongpollResult, DBFILESListFolderLongpollError>Parameters
cursorA cursor as returned by
listFolderorlistFolderContinue. Cursors retrieved by settingincludeMediaInfoinDBFILESListFolderArgto true are not supported.Return Value
Through the response callback, the caller will receive a
DBFILESListFolderLongpollResultobject on success or aDBFILESListFolderLongpollErrorobject on failure. -
A longpoll endpoint to wait for changes on an account. In conjunction with
listFolderContinue, this call gives you a low-latency way to monitor an account for file changes. The connection will block until there are changes available or a timeout occurs. This endpoint is useful mostly for client-side apps. If you’re looking for server-side notifications, check out our webhooks documentation https://www.dropbox.com/developers/reference/webhooks.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListFolderLongpollResult *, DBFILESListFolderLongpollError *> *) listFolderLongpoll:(nonnull NSString *)cursor timeout:(nullable NSNumber *)timeout;Swift
func listFolderLongpoll(_ cursor: String, timeout: NSNumber?) -> DBRpcTask<DBFILESListFolderLongpollResult, DBFILESListFolderLongpollError>Parameters
cursorA cursor as returned by
listFolderorlistFolderContinue. Cursors retrieved by settingincludeMediaInfoinDBFILESListFolderArgto true are not supported.timeoutA timeout in seconds. The request will block for at most this length of time, plus up to 90 seconds of random jitter added to avoid the thundering herd problem. Care should be taken when using this parameter, as some network infrastructure does not support long timeouts.
Return Value
Through the response callback, the caller will receive a
DBFILESListFolderLongpollResultobject on success or aDBFILESListFolderLongpollErrorobject on failure. -
Returns revisions for files based on a file path or a file id. The file path or file id is identified from the latest file entry at the given file path or id. This end point allows your app to query either by file path or file id by setting the mode parameter appropriately. In the
pathinDBFILESListRevisionsMode(default) mode, all revisions at the same file path as the latest file entry are returned. If revisions with the same file id are desired, then mode must be set toid_inDBFILESListRevisionsMode. Theid_inDBFILESListRevisionsModemode is useful to retrieve revisions for a given file across moves or renames.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListRevisionsResult *, DBFILESListRevisionsError *> *)listRevisions:(nonnull NSString *)path;Swift
func listRevisions(_ path: String) -> DBRpcTask<DBFILESListRevisionsResult, DBFILESListRevisionsError>Parameters
pathThe path to the file you want to see the revisions of.
Return Value
Through the response callback, the caller will receive a
DBFILESListRevisionsResultobject on success or aDBFILESListRevisionsErrorobject on failure. -
Returns revisions for files based on a file path or a file id. The file path or file id is identified from the latest file entry at the given file path or id. This end point allows your app to query either by file path or file id by setting the mode parameter appropriately. In the
pathinDBFILESListRevisionsMode(default) mode, all revisions at the same file path as the latest file entry are returned. If revisions with the same file id are desired, then mode must be set toid_inDBFILESListRevisionsMode. Theid_inDBFILESListRevisionsModemode is useful to retrieve revisions for a given file across moves or renames.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListRevisionsResult *, DBFILESListRevisionsError *> *)listRevisions:(nonnull NSString *)path mode:(nullable DBFILESListRevisionsMode *)mode limit:(nullable NSNumber *)limit;Swift
func listRevisions(_ path: String, mode: DBFILESListRevisionsMode?, limit: NSNumber?) -> DBRpcTask<DBFILESListRevisionsResult, DBFILESListRevisionsError>Parameters
pathThe path to the file you want to see the revisions of.
modeDetermines the behavior of the API in listing the revisions for a given file path or id.
limitThe maximum number of revision entries returned.
Return Value
Through the response callback, the caller will receive a
DBFILESListRevisionsResultobject on success or aDBFILESListRevisionsErrorobject on failure. -
Lock the files at the given paths. A locked file will be writable only by the lock holder. A successful response indicates that the file has been locked. Returns a list of the locked file paths and their metadata after this operation.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESLockFileBatchResult *, DBFILESLockFileError *> *) lockFileBatch:(nonnull NSArray<DBFILESLockFileArg *> *)entries;Swift
func lockFileBatch(_ entries: [DBFILESLockFileArg]) -> DBRpcTask<DBFILESLockFileBatchResult, DBFILESLockFileError>Parameters
entriesList of ‘entries’. Each ‘entry’ contains a path of the file which will be locked or queried. Duplicate path arguments in the batch are considered only once.
Return Value
Through the response callback, the caller will receive a
DBFILESLockFileBatchResultobject on success or aDBFILESLockFileErrorobject on failure. -
Move a file or folder to a different location in the user’s Dropbox. If the source path is a folder all its contents will be moved. Note that we do not currently support case-only renaming.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationResult *, DBFILESRelocationError *> *) moveV2:(nonnull NSString *)fromPath toPath:(nonnull NSString *)toPath;Swift
func moveV2(_ fromPath: String, toPath: String) -> DBRpcTask<DBFILESRelocationResult, DBFILESRelocationError>Return Value
Through the response callback, the caller will receive a
DBFILESRelocationResultobject on success or aDBFILESRelocationErrorobject on failure. -
Move a file or folder to a different location in the user’s Dropbox. If the source path is a folder all its contents will be moved. Note that we do not currently support case-only renaming.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationResult *, DBFILESRelocationError *> *) moveV2:(nonnull NSString *)fromPath toPath:(nonnull NSString *)toPath allowSharedFolder:(nullable NSNumber *)allowSharedFolder autorename:(nullable NSNumber *)autorename allowOwnershipTransfer:(nullable NSNumber *)allowOwnershipTransfer;Swift
func moveV2(_ fromPath: String, toPath: String, allowSharedFolder: NSNumber?, autorename: NSNumber?, allowOwnershipTransfer: NSNumber?) -> DBRpcTask<DBFILESRelocationResult, DBFILESRelocationError>Parameters
allowSharedFolderThis flag has no effect.
autorenameIf there’s a conflict, have the Dropbox server try to autorename the file to avoid the conflict.
allowOwnershipTransferAllow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationResultobject on success or aDBFILESRelocationErrorobject on failure. -
Deprecated
move is deprecated. Use move.
DEPRECATED: Move a file or folder to a different location in the user’s Dropbox. If the source path is a folder all its contents will be moved.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESMetadata *, DBFILESRelocationError *> *) move:(nonnull NSString *)fromPath toPath:(nonnull NSString *)toPath;Swift
func move(_ fromPath: String, toPath: String) -> DBRpcTask<DBFILESMetadata, DBFILESRelocationError>Return Value
Through the response callback, the caller will receive a
DBFILESMetadataobject on success or aDBFILESRelocationErrorobject on failure. -
Deprecated
move is deprecated. Use move.
DEPRECATED: Move a file or folder to a different location in the user’s Dropbox. If the source path is a folder all its contents will be moved.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESMetadata *, DBFILESRelocationError *> *) move:(nonnull NSString *)fromPath toPath:(nonnull NSString *)toPath allowSharedFolder:(nullable NSNumber *)allowSharedFolder autorename:(nullable NSNumber *)autorename allowOwnershipTransfer:(nullable NSNumber *)allowOwnershipTransfer;Swift
func move(_ fromPath: String, toPath: String, allowSharedFolder: NSNumber?, autorename: NSNumber?, allowOwnershipTransfer: NSNumber?) -> DBRpcTask<DBFILESMetadata, DBFILESRelocationError>Parameters
allowSharedFolderThis flag has no effect.
autorenameIf there’s a conflict, have the Dropbox server try to autorename the file to avoid the conflict.
allowOwnershipTransferAllow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.
Return Value
Through the response callback, the caller will receive a
DBFILESMetadataobject on success or aDBFILESRelocationErrorobject on failure. -
Move multiple files or folders to different locations at once in the user’s Dropbox. Note that we do not currently support case-only renaming. This route will replace
moveBatch. The main difference is this route will return status for each entry, whilemoveBatchraises failure if any entry fails. This route will either finish synchronously, or return a job ID and do the async move job in background. Please usemoveBatchCheckto check the job status.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchV2Launch *, DBNilObject *> *) moveBatchV2:(nonnull NSArray<DBFILESRelocationPath *> *)entries;Swift
func moveBatchV2(_ entries: [DBFILESRelocationPath]) -> DBRpcTask<DBFILESRelocationBatchV2Launch, DBNilObject>Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchV2Launchobject on success or avoidobject on failure. -
Move multiple files or folders to different locations at once in the user’s Dropbox. Note that we do not currently support case-only renaming. This route will replace
moveBatch. The main difference is this route will return status for each entry, whilemoveBatchraises failure if any entry fails. This route will either finish synchronously, or return a job ID and do the async move job in background. Please usemoveBatchCheckto check the job status.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchV2Launch *, DBNilObject *> *) moveBatchV2:(nonnull NSArray<DBFILESRelocationPath *> *)entries autorename:(nullable NSNumber *)autorename allowOwnershipTransfer:(nullable NSNumber *)allowOwnershipTransfer;Swift
func moveBatchV2(_ entries: [DBFILESRelocationPath], autorename: NSNumber?, allowOwnershipTransfer: NSNumber?) -> DBRpcTask<DBFILESRelocationBatchV2Launch, DBNilObject>Parameters
allowOwnershipTransferAllow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchV2Launchobject on success or avoidobject on failure. -
Deprecated
moveBatch is deprecated. Use moveBatch.
DEPRECATED: Move multiple files or folders to different locations at once in the user’s Dropbox. This route will return job ID immediately and do the async moving job in background. Please use
moveBatchCheckto check the job status.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchLaunch *, DBNilObject *> *)moveBatch: (nonnull NSArray<DBFILESRelocationPath *> *)entries;Swift
func moveBatch(_ entries: [DBFILESRelocationPath]) -> DBRpcTask<DBFILESRelocationBatchLaunch, DBNilObject>Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchLaunchobject on success or avoidobject on failure. -
Deprecated
moveBatch is deprecated. Use moveBatch.
DEPRECATED: Move multiple files or folders to different locations at once in the user’s Dropbox. This route will return job ID immediately and do the async moving job in background. Please use
moveBatchCheckto check the job status.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchLaunch *, DBNilObject *> *) moveBatch:(nonnull NSArray<DBFILESRelocationPath *> *)entries autorename:(nullable NSNumber *)autorename allowSharedFolder:(nullable NSNumber *)allowSharedFolder allowOwnershipTransfer:(nullable NSNumber *)allowOwnershipTransfer;Swift
func moveBatch(_ entries: [DBFILESRelocationPath], autorename: NSNumber?, allowSharedFolder: NSNumber?, allowOwnershipTransfer: NSNumber?) -> DBRpcTask<DBFILESRelocationBatchLaunch, DBNilObject>Parameters
allowSharedFolderThis flag has no effect.
allowOwnershipTransferAllow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchLaunchobject on success or avoidobject on failure. -
Returns the status of an asynchronous job for
moveBatch. It returns list of results for each entry.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchV2JobStatus *, DBASYNCPollError *> *) moveBatchCheckV2:(nonnull NSString *)asyncJobId;Swift
func moveBatchCheckV2(_ asyncJobId: String) -> DBRpcTask<DBFILESRelocationBatchV2JobStatus, DBASYNCPollError>Parameters
asyncJobIdId of the asynchronous job. This is the value of a response returned from the method that launched the job.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchV2JobStatusobject on success or aDBASYNCPollErrorobject on failure. -
Deprecated
moveBatchCheck is deprecated. Use moveBatchCheck.
DEPRECATED: Returns the status of an asynchronous job for
moveBatch. If success, it returns list of results for each entry.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESRelocationBatchJobStatus *, DBASYNCPollError *> *) moveBatchCheck:(nonnull NSString *)asyncJobId;Swift
func moveBatchCheck(_ asyncJobId: String) -> DBRpcTask<DBFILESRelocationBatchJobStatus, DBASYNCPollError>Parameters
asyncJobIdId of the asynchronous job. This is the value of a response returned from the method that launched the job.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchJobStatusobject on success or aDBASYNCPollErrorobject on failure. -
Creates a new Paper doc with the provided content.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESPaperCreateResult *, DBFILESPaperCreateError *> *)paperCreateUrl:(nonnull NSString *)path importFormat:(nonnull DBFILESImportFormat *)importFormat inputUrl:(nonnull NSString *)inputUrl;Swift
func paperCreateUrl(_ path: String, importFormat: DBFILESImportFormat, inputUrl: String) -> DBUploadTask<DBFILESPaperCreateResult, DBFILESPaperCreateError>Parameters
pathThe fully qualified path to the location in the user’s Dropbox where the Paper Doc should be created. This should include the document’s title and end with .paper.
importFormatThe format of the provided data.
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperCreateResultobject on success or aDBFILESPaperCreateErrorobject on failure. -
Creates a new Paper doc with the provided content.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESPaperCreateResult *, DBFILESPaperCreateError *> *)paperCreateData:(nonnull NSString *)path importFormat:(nonnull DBFILESImportFormat *)importFormat inputData:(nonnull NSData *)inputData;Swift
func paperCreateData(_ path: String, importFormat: DBFILESImportFormat, inputData: Data) -> DBUploadTask<DBFILESPaperCreateResult, DBFILESPaperCreateError>Parameters
pathThe fully qualified path to the location in the user’s Dropbox where the Paper Doc should be created. This should include the document’s title and end with .paper.
importFormatThe format of the provided data.
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperCreateResultobject on success or aDBFILESPaperCreateErrorobject on failure. -
Creates a new Paper doc with the provided content.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESPaperCreateResult *, DBFILESPaperCreateError *> *)paperCreateStream:(nonnull NSString *)path importFormat:(nonnull DBFILESImportFormat *)importFormat inputStream:(nonnull NSInputStream *)inputStream;Swift
func paperCreateStream(_ path: String, importFormat: DBFILESImportFormat, inputStream: InputStream) -> DBUploadTask<DBFILESPaperCreateResult, DBFILESPaperCreateError>Parameters
pathThe fully qualified path to the location in the user’s Dropbox where the Paper Doc should be created. This should include the document’s title and end with .paper.
importFormatThe format of the provided data.
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperCreateResultobject on success or aDBFILESPaperCreateErrorobject on failure. -
Updates an existing Paper doc with the provided content.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESPaperUpdateResult *, DBFILESPaperUpdateError *> *)paperUpdateUrl:(nonnull NSString *)path importFormat:(nonnull DBFILESImportFormat *)importFormat docUpdatePolicy:(nonnull DBFILESPaperDocUpdatePolicy *)docUpdatePolicy inputUrl:(nonnull NSString *)inputUrl;Swift
func paperUpdateUrl(_ path: String, importFormat: DBFILESImportFormat, docUpdatePolicy: DBFILESPaperDocUpdatePolicy, inputUrl: String) -> DBUploadTask<DBFILESPaperUpdateResult, DBFILESPaperUpdateError>Parameters
pathPath in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormatThe format of the provided data.
docUpdatePolicyHow the provided content should be applied to the doc.
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResultobject on success or aDBFILESPaperUpdateErrorobject on failure. -
Updates an existing Paper doc with the provided content.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESPaperUpdateResult *, DBFILESPaperUpdateError *> *)paperUpdateUrl:(nonnull NSString *)path importFormat:(nonnull DBFILESImportFormat *)importFormat docUpdatePolicy:(nonnull DBFILESPaperDocUpdatePolicy *)docUpdatePolicy paperRevision:(nullable NSNumber *)paperRevision inputUrl:(nonnull NSString *)inputUrl;Swift
func paperUpdateUrl(_ path: String, importFormat: DBFILESImportFormat, docUpdatePolicy: DBFILESPaperDocUpdatePolicy, paperRevision: NSNumber?, inputUrl: String) -> DBUploadTask<DBFILESPaperUpdateResult, DBFILESPaperUpdateError>Parameters
pathPath in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormatThe format of the provided data.
docUpdatePolicyHow the provided content should be applied to the doc.
paperRevisionThe latest doc revision. Required when doc_update_policy is update. This value must match the current revision of the doc or error revision_mismatch will be returned.
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResultobject on success or aDBFILESPaperUpdateErrorobject on failure. -
Updates an existing Paper doc with the provided content.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESPaperUpdateResult *, DBFILESPaperUpdateError *> *)paperUpdateData:(nonnull NSString *)path importFormat:(nonnull DBFILESImportFormat *)importFormat docUpdatePolicy:(nonnull DBFILESPaperDocUpdatePolicy *)docUpdatePolicy inputData:(nonnull NSData *)inputData;Swift
func paperUpdateData(_ path: String, importFormat: DBFILESImportFormat, docUpdatePolicy: DBFILESPaperDocUpdatePolicy, inputData: Data) -> DBUploadTask<DBFILESPaperUpdateResult, DBFILESPaperUpdateError>Parameters
pathPath in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormatThe format of the provided data.
docUpdatePolicyHow the provided content should be applied to the doc.
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResultobject on success or aDBFILESPaperUpdateErrorobject on failure. -
Updates an existing Paper doc with the provided content.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESPaperUpdateResult *, DBFILESPaperUpdateError *> *)paperUpdateData:(nonnull NSString *)path importFormat:(nonnull DBFILESImportFormat *)importFormat docUpdatePolicy:(nonnull DBFILESPaperDocUpdatePolicy *)docUpdatePolicy paperRevision:(nullable NSNumber *)paperRevision inputData:(nonnull NSData *)inputData;Swift
func paperUpdateData(_ path: String, importFormat: DBFILESImportFormat, docUpdatePolicy: DBFILESPaperDocUpdatePolicy, paperRevision: NSNumber?, inputData: Data) -> DBUploadTask<DBFILESPaperUpdateResult, DBFILESPaperUpdateError>Parameters
pathPath in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormatThe format of the provided data.
docUpdatePolicyHow the provided content should be applied to the doc.
paperRevisionThe latest doc revision. Required when doc_update_policy is update. This value must match the current revision of the doc or error revision_mismatch will be returned.
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResultobject on success or aDBFILESPaperUpdateErrorobject on failure. -
Updates an existing Paper doc with the provided content.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESPaperUpdateResult *, DBFILESPaperUpdateError *> *)paperUpdateStream:(nonnull NSString *)path importFormat:(nonnull DBFILESImportFormat *)importFormat docUpdatePolicy: (nonnull DBFILESPaperDocUpdatePolicy *)docUpdatePolicy inputStream:(nonnull NSInputStream *)inputStream;Swift
func paperUpdateStream(_ path: String, importFormat: DBFILESImportFormat, docUpdatePolicy: DBFILESPaperDocUpdatePolicy, inputStream: InputStream) -> DBUploadTask<DBFILESPaperUpdateResult, DBFILESPaperUpdateError>Parameters
pathPath in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormatThe format of the provided data.
docUpdatePolicyHow the provided content should be applied to the doc.
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResultobject on success or aDBFILESPaperUpdateErrorobject on failure. -
Updates an existing Paper doc with the provided content.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESPaperUpdateResult *, DBFILESPaperUpdateError *> *)paperUpdateStream:(nonnull NSString *)path importFormat:(nonnull DBFILESImportFormat *)importFormat docUpdatePolicy: (nonnull DBFILESPaperDocUpdatePolicy *)docUpdatePolicy paperRevision:(nullable NSNumber *)paperRevision inputStream:(nonnull NSInputStream *)inputStream;Swift
func paperUpdateStream(_ path: String, importFormat: DBFILESImportFormat, docUpdatePolicy: DBFILESPaperDocUpdatePolicy, paperRevision: NSNumber?, inputStream: InputStream) -> DBUploadTask<DBFILESPaperUpdateResult, DBFILESPaperUpdateError>Parameters
pathPath in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormatThe format of the provided data.
docUpdatePolicyHow the provided content should be applied to the doc.
paperRevisionThe latest doc revision. Required when doc_update_policy is update. This value must match the current revision of the doc or error revision_mismatch will be returned.
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResultobject on success or aDBFILESPaperUpdateErrorobject on failure. -
Permanently delete the file or folder at a given path (see https://www.dropbox.com/en/help/40). If the given file or folder is not yet deleted, this route will first delete it. It is possible for this route to successfully delete, then fail to permanently delete. Note: This endpoint is only available for Dropbox Business apps.
Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILESDeleteError *> *)permanentlyDelete: (nonnull NSString *)path;Swift
func permanentlyDelete(_ path: String) -> DBRpcTask<DBNilObject, DBFILESDeleteError>Parameters
pathPath in the user’s Dropbox to delete.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESDeleteErrorobject on failure. -
Permanently delete the file or folder at a given path (see https://www.dropbox.com/en/help/40). If the given file or folder is not yet deleted, this route will first delete it. It is possible for this route to successfully delete, then fail to permanently delete. Note: This endpoint is only available for Dropbox Business apps.
Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILESDeleteError *> *) permanentlyDelete:(nonnull NSString *)path parentRev:(nullable NSString *)parentRev;Swift
func permanentlyDelete(_ path: String, parentRev: String?) -> DBRpcTask<DBNilObject, DBFILESDeleteError>Parameters
pathPath in the user’s Dropbox to delete.
parentRevPerform delete if given “rev” matches the existing file’s latest “rev”. This field does not support deleting a folder.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESDeleteErrorobject on failure. -
Deprecated
propertiesAdd is deprecated.
DEPRECATED: The propertiesAdd route
Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESAddPropertiesError *> *) propertiesAdd:(nonnull NSString *)path propertyGroups: (nonnull NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups;Swift
func propertiesAdd(_ path: String, propertyGroups: [DBFILEPROPERTIESPropertyGroup]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESAddPropertiesError>Parameters
pathA unique identifier for the file or folder.
propertyGroupsThe property groups which are to be added to a Dropbox file. No two groups in the input should refer to the same template.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILEPROPERTIESAddPropertiesErrorobject on failure. -
Deprecated
propertiesOverwrite is deprecated.
DEPRECATED: The propertiesOverwrite route
Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESInvalidPropertyGroupError *> *)propertiesOverwrite:(nonnull NSString *)path propertyGroups: (nonnull NSArray<DBFILEPROPERTIESPropertyGroup *> *) propertyGroups;Swift
func propertiesOverwrite(_ path: String, propertyGroups: [DBFILEPROPERTIESPropertyGroup]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESInvalidPropertyGroupError>Parameters
pathA unique identifier for the file or folder.
propertyGroupsThe property groups “snapshot” updates to force apply. No two groups in the input should refer to the same template.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILEPROPERTIESInvalidPropertyGroupErrorobject on failure. -
Deprecated
propertiesRemove is deprecated.
DEPRECATED: The propertiesRemove route
Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESRemovePropertiesError *> *) propertiesRemove:(nonnull NSString *)path propertyTemplateIds:(nonnull NSArray<NSString *> *)propertyTemplateIds;Swift
func propertiesRemove(_ path: String, propertyTemplateIds: [String]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESRemovePropertiesError>Parameters
pathA unique identifier for the file or folder.
propertyTemplateIdsA list of identifiers for a template created by
templatesAddForUserortemplatesAddForTeam.Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILEPROPERTIESRemovePropertiesErrorobject on failure. -
Deprecated
propertiesTemplateGet is deprecated.
DEPRECATED: The propertiesTemplateGet route
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESGetTemplateResult *, DBFILEPROPERTIESTemplateError *> *)propertiesTemplateGet: (nonnull NSString *)templateId;Swift
func propertiesTemplateGet(_ templateId: String) -> DBRpcTask<DBFILEPROPERTIESGetTemplateResult, DBFILEPROPERTIESTemplateError>Parameters
templateIdAn identifier for template added by route See
templatesAddForUserortemplatesAddForTeam.Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESGetTemplateResultobject on success or aDBFILEPROPERTIESTemplateErrorobject on failure. -
Deprecated
propertiesTemplateList is deprecated.
DEPRECATED: The propertiesTemplateList route
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESListTemplateResult *, DBFILEPROPERTIESTemplateError *> *)propertiesTemplateList;Swift
func propertiesTemplateList() -> DBRpcTask<DBFILEPROPERTIESListTemplateResult, DBFILEPROPERTIESTemplateError>Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESListTemplateResultobject on success or aDBFILEPROPERTIESTemplateErrorobject on failure. -
Deprecated
propertiesUpdate is deprecated.
DEPRECATED: The propertiesUpdate route
Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESUpdatePropertiesError *> *) propertiesUpdate:(nonnull NSString *)path updatePropertyGroups: (nonnull NSArray<DBFILEPROPERTIESPropertyGroupUpdate *> *) updatePropertyGroups;Swift
func propertiesUpdate(_ path: String, updatePropertyGroups: [DBFILEPROPERTIESPropertyGroupUpdate]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESUpdatePropertiesError>Parameters
pathA unique identifier for the file or folder.
updatePropertyGroupsThe property groups “delta” updates to apply.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILEPROPERTIESUpdatePropertiesErrorobject on failure. -
Restore a specific revision of a file to the given path.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESFileMetadata *, DBFILESRestoreError *> *) restore:(nonnull NSString *)path rev:(nonnull NSString *)rev;Swift
func restore(_ path: String, rev: String) -> DBRpcTask<DBFILESFileMetadata, DBFILESRestoreError>Parameters
pathThe path to save the restored file.
revThe revision to restore.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESRestoreErrorobject on failure. -
Save the data from a specified URL into a file in user’s Dropbox. Note that the transfer from the URL must complete within 5 minutes, or the operation will time out and the job will fail. If the given path already exists, the file will be renamed to avoid the conflict (e.g. myfile (1).txt).
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESSaveUrlResult *, DBFILESSaveUrlError *> *) saveUrl:(nonnull NSString *)path url:(nonnull NSString *)url;Swift
func saveUrl(_ path: String, url: String) -> DBRpcTask<DBFILESSaveUrlResult, DBFILESSaveUrlError>Parameters
pathThe path in Dropbox where the URL will be saved to.
urlThe URL to be saved.
Return Value
Through the response callback, the caller will receive a
DBFILESSaveUrlResultobject on success or aDBFILESSaveUrlErrorobject on failure. -
Check the status of a
saveUrljob.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESSaveUrlJobStatus *, DBASYNCPollError *> *) saveUrlCheckJobStatus:(nonnull NSString *)asyncJobId;Swift
func saveUrlCheckJobStatus(_ asyncJobId: String) -> DBRpcTask<DBFILESSaveUrlJobStatus, DBASYNCPollError>Parameters
asyncJobIdId of the asynchronous job. This is the value of a response returned from the method that launched the job.
Return Value
Through the response callback, the caller will receive a
DBFILESSaveUrlJobStatusobject on success or aDBASYNCPollErrorobject on failure. -
Deprecated
search is deprecated. Use search.
DEPRECATED: Searches for files and folders. Note: Recent changes will be reflected in search results within a few seconds and older revisions of existing files may still match your query for up to a few days.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESSearchResult *, DBFILESSearchError *> *) search:(nonnull NSString *)path query:(nonnull NSString *)query;Swift
func search(_ path: String, query: String) -> DBRpcTask<DBFILESSearchResult, DBFILESSearchError>Parameters
pathThe path in the user’s Dropbox to search. Should probably be a folder.
queryThe string to search for. Query string may be rewritten to improve relevance of results. The string is split on spaces into multiple tokens. For file name searching, the last token is used for prefix matching (i.e. “bat c” matches “bat cave” but not “batman car”).
Return Value
Through the response callback, the caller will receive a
DBFILESSearchResultobject on success or aDBFILESSearchErrorobject on failure. -
Deprecated
search is deprecated. Use search.
DEPRECATED: Searches for files and folders. Note: Recent changes will be reflected in search results within a few seconds and older revisions of existing files may still match your query for up to a few days.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESSearchResult *, DBFILESSearchError *> *) search:(nonnull NSString *)path query:(nonnull NSString *)query start:(nullable NSNumber *)start maxResults:(nullable NSNumber *)maxResults mode:(nullable DBFILESSearchMode *)mode;Swift
func search(_ path: String, query: String, start: NSNumber?, maxResults: NSNumber?, mode: DBFILESSearchMode?) -> DBRpcTask<DBFILESSearchResult, DBFILESSearchError>Parameters
pathThe path in the user’s Dropbox to search. Should probably be a folder.
queryThe string to search for. Query string may be rewritten to improve relevance of results. The string is split on spaces into multiple tokens. For file name searching, the last token is used for prefix matching (i.e. “bat c” matches “bat cave” but not “batman car”).
startThe starting index within the search results (used for paging).
maxResultsThe maximum number of search results to return.
modeThe search mode (filename, filename_and_content, or deleted_filename). Note that searching file content is only available for Dropbox Business accounts.
Return Value
Through the response callback, the caller will receive a
DBFILESSearchResultobject on success or aDBFILESSearchErrorobject on failure. -
Searches for files and folders. Note:
searchalong withsearchContinuecan only be used to retrieve a maximum of 10,000 matches. Recent changes may not immediately be reflected in search results due to a short delay in indexing. Duplicate results may be returned across pages. Some results may not be returned.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESSearchV2Result *, DBFILESSearchError *> *)searchV2: (nonnull NSString *)query;Swift
func searchV2(_ query: String) -> DBRpcTask<DBFILESSearchV2Result, DBFILESSearchError>Parameters
queryThe string to search for. May match across multiple fields based on the request arguments.
Return Value
Through the response callback, the caller will receive a
DBFILESSearchV2Resultobject on success or aDBFILESSearchErrorobject on failure. -
Searches for files and folders. Note:
searchalong withsearchContinuecan only be used to retrieve a maximum of 10,000 matches. Recent changes may not immediately be reflected in search results due to a short delay in indexing. Duplicate results may be returned across pages. Some results may not be returned.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESSearchV2Result *, DBFILESSearchError *> *) searchV2:(nonnull NSString *)query options:(nullable DBFILESSearchOptions *)options matchFieldOptions: (nullable DBFILESSearchMatchFieldOptions *)matchFieldOptions includeHighlights:(nullable NSNumber *)includeHighlights;Swift
func searchV2(_ query: String, options: DBFILESSearchOptions?, matchFieldOptions: DBFILESSearchMatchFieldOptions?, includeHighlights: NSNumber?) -> DBRpcTask<DBFILESSearchV2Result, DBFILESSearchError>Parameters
queryThe string to search for. May match across multiple fields based on the request arguments.
optionsOptions for more targeted search results.
matchFieldOptionsOptions for search results match fields.
includeHighlightsDeprecated and moved this option to SearchMatchFieldOptions.
Return Value
Through the response callback, the caller will receive a
DBFILESSearchV2Resultobject on success or aDBFILESSearchErrorobject on failure. -
Fetches the next page of search results returned from
search. Note:searchalong withsearchContinuecan only be used to retrieve a maximum of 10,000 matches. Recent changes may not immediately be reflected in search results due to a short delay in indexing. Duplicate results may be returned across pages. Some results may not be returned.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESSearchV2Result *, DBFILESSearchError *> *) searchContinueV2:(nonnull NSString *)cursor;Swift
func searchContinueV2(_ cursor: String) -> DBRpcTask<DBFILESSearchV2Result, DBFILESSearchError>Parameters
cursorThe cursor returned by your last call to
search. Used to fetch the next page of results.Return Value
Through the response callback, the caller will receive a
DBFILESSearchV2Resultobject on success or aDBFILESSearchErrorobject on failure. -
Add a tag to an item. A tag is a string. The strings are automatically converted to lowercase letters. No more than 20 tags can be added to a given item.
Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILESAddTagError *> *) tagsAdd:(nonnull NSString *)path tagText:(nonnull NSString *)tagText;Swift
func tagsAdd(_ path: String, tagText: String) -> DBRpcTask<DBNilObject, DBFILESAddTagError>Parameters
pathPath to the item to be tagged.
tagTextThe value of the tag to add. Will be automatically converted to lowercase letters.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESAddTagErrorobject on failure. -
Get list of tags assigned to items.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESGetTagsResult *, DBFILESBaseTagError *> *)tagsGet: (nonnull NSArray<NSString *> *)paths;Swift
func tagsGet(_ paths: [String]) -> DBRpcTask<DBFILESGetTagsResult, DBFILESBaseTagError>Parameters
pathsPath to the items.
Return Value
Through the response callback, the caller will receive a
DBFILESGetTagsResultobject on success or aDBFILESBaseTagErrorobject on failure. -
Remove a tag from an item.
Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILESRemoveTagError *> *) tagsRemove:(nonnull NSString *)path tagText:(nonnull NSString *)tagText;Swift
func tagsRemove(_ path: String, tagText: String) -> DBRpcTask<DBNilObject, DBFILESRemoveTagError>Parameters
pathPath to the item to tag.
tagTextThe tag to remove. Will be automatically converted to lowercase letters.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESRemoveTagErrorobject on failure. -
Unlock the files at the given paths. A locked file can only be unlocked by the lock holder or, if a business account, a team admin. A successful response indicates that the file has been unlocked. Returns a list of the unlocked file paths and their metadata after this operation.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESLockFileBatchResult *, DBFILESLockFileError *> *) unlockFileBatch:(nonnull NSArray<DBFILESUnlockFileArg *> *)entries;Swift
func unlockFileBatch(_ entries: [DBFILESUnlockFileArg]) -> DBRpcTask<DBFILESLockFileBatchResult, DBFILESLockFileError>Parameters
entriesList of ‘entries’. Each ‘entry’ contains a path of the file which will be unlocked. Duplicate path arguments in the batch are considered only once.
Return Value
Through the response callback, the caller will receive a
DBFILESLockFileBatchResultobject on success or aDBFILESLockFileErrorobject on failure. -
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
uploadSessionStart. 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 https://www.dropbox.com/developers/reference/data-transport-limit.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) uploadUrl:(nonnull NSString *)path inputUrl:(nonnull NSString *)inputUrl;Swift
func uploadUrl(_ path: String, inputUrl: String) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
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
uploadSessionStart. 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 https://www.dropbox.com/developers/reference/data-transport-limit.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) uploadUrl:(nonnull NSString *)path mode:(nullable DBFILESWriteMode *)mode autorename:(nullable NSNumber *)autorename clientModified:(nullable NSDate *)clientModified mute:(nullable NSNumber *)mute propertyGroups: (nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups strictConflict:(nullable NSNumber *)strictConflict contentHash:(nullable NSString *)contentHash inputUrl:(nonnull NSString *)inputUrl;Swift
func uploadUrl(_ path: String, mode: DBFILESWriteMode?, autorename: NSNumber?, clientModified: Date?, mute: NSNumber?, propertyGroups: [DBFILEPROPERTIESPropertyGroup]?, strictConflict: NSNumber?, contentHash: String?, inputUrl: String) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
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
uploadSessionStart. 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 https://www.dropbox.com/developers/reference/data-transport-limit.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) uploadData:(nonnull NSString *)path inputData:(nonnull NSData *)inputData;Swift
func uploadData(_ path: String, inputData: Data) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
-uploadData:mode: autorename: clientModified: mute: propertyGroups: strictConflict: contentHash: inputData: 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
uploadSessionStart. 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 https://www.dropbox.com/developers/reference/data-transport-limit.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) uploadData:(nonnull NSString *)path mode:(nullable DBFILESWriteMode *)mode autorename:(nullable NSNumber *)autorename clientModified:(nullable NSDate *)clientModified mute:(nullable NSNumber *)mute propertyGroups: (nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups strictConflict:(nullable NSNumber *)strictConflict contentHash:(nullable NSString *)contentHash inputData:(nonnull NSData *)inputData;Swift
func uploadData(_ path: String, mode: DBFILESWriteMode?, autorename: NSNumber?, clientModified: Date?, mute: NSNumber?, propertyGroups: [DBFILEPROPERTIESPropertyGroup]?, strictConflict: NSNumber?, contentHash: String?, inputData: Data) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
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
uploadSessionStart. 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 https://www.dropbox.com/developers/reference/data-transport-limit.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) uploadStream:(nonnull NSString *)path inputStream:(nonnull NSInputStream *)inputStream;Swift
func uploadStream(_ path: String, inputStream: InputStream) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
-uploadStream:mode: autorename: clientModified: mute: propertyGroups: strictConflict: contentHash: inputStream: 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
uploadSessionStart. 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 https://www.dropbox.com/developers/reference/data-transport-limit.Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadError *> *) uploadStream:(nonnull NSString *)path mode:(nullable DBFILESWriteMode *)mode autorename:(nullable NSNumber *)autorename clientModified:(nullable NSDate *)clientModified mute:(nullable NSNumber *)mute propertyGroups: (nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups strictConflict:(nullable NSNumber *)strictConflict contentHash:(nullable NSString *)contentHash inputStream:(nonnull NSInputStream *)inputStream;Swift
func uploadStream(_ path: String, mode: DBFILESWriteMode?, autorename: NSNumber?, clientModified: Date?, mute: NSNumber?, propertyGroups: [DBFILEPROPERTIESPropertyGroup]?, strictConflict: NSNumber?, contentHash: String?, inputStream: InputStream) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadError>Parameters
contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadErrorobject on failure. -
Append more data to an upload session. When the parameter close is set, this call will close the session. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBNilObject *, DBFILESUploadSessionAppendError *> *) uploadSessionAppendV2Url:(nonnull DBFILESUploadSessionCursor *)cursor inputUrl:(nonnull NSString *)inputUrl;Swift
func uploadSessionAppendV2Url(_ cursor: DBFILESUploadSessionCursor, inputUrl: String) -> DBUploadTask<DBNilObject, DBFILESUploadSessionAppendError>Parameters
cursorContains the upload session ID and the offset.
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESUploadSessionAppendErrorobject on failure. -
Append more data to an upload session. When the parameter close is set, this call will close the session. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBNilObject *, DBFILESUploadSessionAppendError *> *) uploadSessionAppendV2Url:(nonnull DBFILESUploadSessionCursor *)cursor close:(nullable NSNumber *)close contentHash:(nullable NSString *)contentHash inputUrl:(nonnull NSString *)inputUrl;Swift
func uploadSessionAppendV2Url(_ cursor: DBFILESUploadSessionCursor, close: NSNumber?, contentHash: String?, inputUrl: String) -> DBUploadTask<DBNilObject, DBFILESUploadSessionAppendError>Parameters
cursorContains the upload session ID and the offset.
closeIf true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppendanymore with the current session.contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESUploadSessionAppendErrorobject on failure. -
Append more data to an upload session. When the parameter close is set, this call will close the session. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBNilObject *, DBFILESUploadSessionAppendError *> *) uploadSessionAppendV2Data:(nonnull DBFILESUploadSessionCursor *)cursor inputData:(nonnull NSData *)inputData;Swift
func uploadSessionAppendV2Data(_ cursor: DBFILESUploadSessionCursor, inputData: Data) -> DBUploadTask<DBNilObject, DBFILESUploadSessionAppendError>Parameters
cursorContains the upload session ID and the offset.
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESUploadSessionAppendErrorobject on failure. -
Append more data to an upload session. When the parameter close is set, this call will close the session. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBNilObject *, DBFILESUploadSessionAppendError *> *) uploadSessionAppendV2Data:(nonnull DBFILESUploadSessionCursor *)cursor close:(nullable NSNumber *)close contentHash:(nullable NSString *)contentHash inputData:(nonnull NSData *)inputData;Swift
func uploadSessionAppendV2Data(_ cursor: DBFILESUploadSessionCursor, close: NSNumber?, contentHash: String?, inputData: Data) -> DBUploadTask<DBNilObject, DBFILESUploadSessionAppendError>Parameters
cursorContains the upload session ID and the offset.
closeIf true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppendanymore with the current session.contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESUploadSessionAppendErrorobject on failure. -
Append more data to an upload session. When the parameter close is set, this call will close the session. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBNilObject *, DBFILESUploadSessionAppendError *> *) uploadSessionAppendV2Stream:(nonnull DBFILESUploadSessionCursor *)cursor inputStream:(nonnull NSInputStream *)inputStream;Swift
func uploadSessionAppendV2Stream(_ cursor: DBFILESUploadSessionCursor, inputStream: InputStream) -> DBUploadTask<DBNilObject, DBFILESUploadSessionAppendError>Parameters
cursorContains the upload session ID and the offset.
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESUploadSessionAppendErrorobject on failure. -
Append more data to an upload session. When the parameter close is set, this call will close the session. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBNilObject *, DBFILESUploadSessionAppendError *> *) uploadSessionAppendV2Stream:(nonnull DBFILESUploadSessionCursor *)cursor close:(nullable NSNumber *)close contentHash:(nullable NSString *)contentHash inputStream:(nonnull NSInputStream *)inputStream;Swift
func uploadSessionAppendV2Stream(_ cursor: DBFILESUploadSessionCursor, close: NSNumber?, contentHash: String?, inputStream: InputStream) -> DBUploadTask<DBNilObject, DBFILESUploadSessionAppendError>Parameters
cursorContains the upload session ID and the offset.
closeIf true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppendanymore with the current session.contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESUploadSessionAppendErrorobject on failure. -
Deprecated
uploadSessionAppend is deprecated. Use uploadSessionAppend.
DEPRECATED: Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBNilObject *, DBFILESUploadSessionAppendError *> *) uploadSessionAppendUrl:(nonnull NSString *)sessionId offset:(nonnull NSNumber *)offset inputUrl:(nonnull NSString *)inputUrl;Swift
func uploadSessionAppendUrl(_ sessionId: String, offset: NSNumber, inputUrl: String) -> DBUploadTask<DBNilObject, DBFILESUploadSessionAppendError>Parameters
sessionIdThe upload session ID (returned by
uploadSessionStart).offsetOffset in bytes at which data should be appended. We use this to make sure upload data isn’t lost or duplicated in the event of a network error.
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESUploadSessionAppendErrorobject on failure. -
Deprecated
uploadSessionAppend is deprecated. Use uploadSessionAppend.
DEPRECATED: Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBNilObject *, DBFILESUploadSessionAppendError *> *) uploadSessionAppendData:(nonnull NSString *)sessionId offset:(nonnull NSNumber *)offset inputData:(nonnull NSData *)inputData;Swift
func uploadSessionAppendData(_ sessionId: String, offset: NSNumber, inputData: Data) -> DBUploadTask<DBNilObject, DBFILESUploadSessionAppendError>Parameters
sessionIdThe upload session ID (returned by
uploadSessionStart).offsetOffset in bytes at which data should be appended. We use this to make sure upload data isn’t lost or duplicated in the event of a network error.
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESUploadSessionAppendErrorobject on failure. -
Deprecated
uploadSessionAppend is deprecated. Use uploadSessionAppend.
DEPRECATED: Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBNilObject *, DBFILESUploadSessionAppendError *> *) uploadSessionAppendStream:(nonnull NSString *)sessionId offset:(nonnull NSNumber *)offset inputStream:(nonnull NSInputStream *)inputStream;Swift
func uploadSessionAppendStream(_ sessionId: String, offset: NSNumber, inputStream: InputStream) -> DBUploadTask<DBNilObject, DBFILESUploadSessionAppendError>Parameters
sessionIdThe upload session ID (returned by
uploadSessionStart).offsetOffset in bytes at which data should be appended. We use this to make sure upload data isn’t lost or duplicated in the event of a network error.
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILESUploadSessionAppendErrorobject on failure. -
Finish an upload session and save the uploaded data to the given file path. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadSessionFinishError *> *) uploadSessionFinishUrl:(nonnull DBFILESUploadSessionCursor *)cursor commit:(nonnull DBFILESCommitInfo *)commit inputUrl:(nonnull NSString *)inputUrl;Swift
func uploadSessionFinishUrl(_ cursor: DBFILESUploadSessionCursor, commit: DBFILESCommitInfo, inputUrl: String) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadSessionFinishError>Parameters
cursorContains the upload session ID and the offset.
commitContains the path and other optional modifiers for the commit.
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadSessionFinishErrorobject on failure. -
Finish an upload session and save the uploaded data to the given file path. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadSessionFinishError *> *) uploadSessionFinishUrl:(nonnull DBFILESUploadSessionCursor *)cursor commit:(nonnull DBFILESCommitInfo *)commit contentHash:(nullable NSString *)contentHash inputUrl:(nonnull NSString *)inputUrl;Swift
func uploadSessionFinishUrl(_ cursor: DBFILESUploadSessionCursor, commit: DBFILESCommitInfo, contentHash: String?, inputUrl: String) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadSessionFinishError>Parameters
cursorContains the upload session ID and the offset.
commitContains the path and other optional modifiers for the commit.
contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadSessionFinishErrorobject on failure. -
Finish an upload session and save the uploaded data to the given file path. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadSessionFinishError *> *) uploadSessionFinishData:(nonnull DBFILESUploadSessionCursor *)cursor commit:(nonnull DBFILESCommitInfo *)commit inputData:(nonnull NSData *)inputData;Swift
func uploadSessionFinishData(_ cursor: DBFILESUploadSessionCursor, commit: DBFILESCommitInfo, inputData: Data) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadSessionFinishError>Parameters
cursorContains the upload session ID and the offset.
commitContains the path and other optional modifiers for the commit.
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadSessionFinishErrorobject on failure. -
Finish an upload session and save the uploaded data to the given file path. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadSessionFinishError *> *) uploadSessionFinishData:(nonnull DBFILESUploadSessionCursor *)cursor commit:(nonnull DBFILESCommitInfo *)commit contentHash:(nullable NSString *)contentHash inputData:(nonnull NSData *)inputData;Swift
func uploadSessionFinishData(_ cursor: DBFILESUploadSessionCursor, commit: DBFILESCommitInfo, contentHash: String?, inputData: Data) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadSessionFinishError>Parameters
cursorContains the upload session ID and the offset.
commitContains the path and other optional modifiers for the commit.
contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadSessionFinishErrorobject on failure. -
Finish an upload session and save the uploaded data to the given file path. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadSessionFinishError *> *) uploadSessionFinishStream:(nonnull DBFILESUploadSessionCursor *)cursor commit:(nonnull DBFILESCommitInfo *)commit inputStream:(nonnull NSInputStream *)inputStream;Swift
func uploadSessionFinishStream(_ cursor: DBFILESUploadSessionCursor, commit: DBFILESCommitInfo, inputStream: InputStream) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadSessionFinishError>Parameters
cursorContains the upload session ID and the offset.
commitContains the path and other optional modifiers for the commit.
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadSessionFinishErrorobject on failure. -
Finish an upload session and save the uploaded data to the given file path. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. 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 https://www.dropbox.com/developers/reference/data-transport-limit.
Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESFileMetadata *, DBFILESUploadSessionFinishError *> *) uploadSessionFinishStream:(nonnull DBFILESUploadSessionCursor *)cursor commit:(nonnull DBFILESCommitInfo *)commit contentHash:(nullable NSString *)contentHash inputStream:(nonnull NSInputStream *)inputStream;Swift
func uploadSessionFinishStream(_ cursor: DBFILESUploadSessionCursor, commit: DBFILESCommitInfo, contentHash: String?, inputStream: InputStream) -> DBUploadTask<DBFILESFileMetadata, DBFILESUploadSessionFinishError>Parameters
cursorContains the upload session ID and the offset.
commitContains the path and other optional modifiers for the commit.
contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadataobject on success or aDBFILESUploadSessionFinishErrorobject on failure. -
Deprecated
uploadSessionFinishBatch is deprecated. Use uploadSessionFinishBatch.
DEPRECATED: This route helps you commit many files at once into a user’s Dropbox. Use
uploadSessionStartanduploadSessionAppendto upload file contents. We recommend uploading many files in parallel to increase throughput. Once the file contents have been uploaded, rather than callinguploadSessionFinish, use this route to finish all your upload sessions in a single request.closeinDBFILESUploadSessionStartArgorcloseinDBFILESUploadSessionAppendArgneeds to be true for the lastuploadSessionStartoruploadSessionAppendcall. The maximum size of a file one can upload to an upload session is 350 GB. This route will return a job_id immediately and do the async commit job in background. UseuploadSessionFinishBatchCheckto check the job status. For the same account, this route should be executed serially. That means you should not start the next job before current job finishes. We allow up to 1000 entries in a single request. 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 https://www.dropbox.com/developers/reference/data-transport-limit.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESUploadSessionFinishBatchLaunch *, DBNilObject *> *) uploadSessionFinishBatch: (nonnull NSArray<DBFILESUploadSessionFinishArg *> *)entries;Swift
func uploadSessionFinishBatch(_ entries: [DBFILESUploadSessionFinishArg]) -> DBRpcTask<DBFILESUploadSessionFinishBatchLaunch, DBNilObject>Parameters
entriesCommit information for each file in the batch.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionFinishBatchLaunchobject on success or avoidobject on failure. -
This route helps you commit many files at once into a user’s Dropbox. Use
uploadSessionStartanduploadSessionAppendto upload file contents. We recommend uploading many files in parallel to increase throughput. Once the file contents have been uploaded, rather than callinguploadSessionFinish, use this route to finish all your upload sessions in a single request.closeinDBFILESUploadSessionStartArgorcloseinDBFILESUploadSessionAppendArgneeds to be true for the lastuploadSessionStartoruploadSessionAppendcall of each upload session. The maximum size of a file one can upload to an upload session is 350 GB. We allow up to 1000 entries in a single request. 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 https://www.dropbox.com/developers/reference/data-transport-limit.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESUploadSessionFinishBatchResult *, DBNilObject *> *) uploadSessionFinishBatchV2: (nonnull NSArray<DBFILESUploadSessionFinishArg *> *)entries;Swift
func uploadSessionFinishBatchV2(_ entries: [DBFILESUploadSessionFinishArg]) -> DBRpcTask<DBFILESUploadSessionFinishBatchResult, DBNilObject>Parameters
entriesCommit information for each file in the batch.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionFinishBatchResultobject on success or avoidobject on failure. -
Returns the status of an asynchronous job for
uploadSessionFinishBatch. If success, it returns list of result for each entry.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESUploadSessionFinishBatchJobStatus *, DBASYNCPollError *> *)uploadSessionFinishBatchCheck: (nonnull NSString *)asyncJobId;Swift
func uploadSessionFinishBatchCheck(_ asyncJobId: String) -> DBRpcTask<DBFILESUploadSessionFinishBatchJobStatus, DBASYNCPollError>Parameters
asyncJobIdId of the asynchronous job. This is the value of a response returned from the method that launched the job.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionFinishBatchJobStatusobject on success or aDBASYNCPollErrorobject on failure. -
Upload sessions allow you to upload a single file in one or more requests, for example where the size of the file is greater than 150 MB. This call starts a new upload session with the given data. You can then use
uploadSessionAppendto add more data anduploadSessionFinishto save all the data to a file in Dropbox. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. An upload session can be used for a maximum of 7 days. Attempting to use ansessionIdinDBFILESUploadSessionStartResultwithuploadSessionAppendoruploadSessionFinishmore than 7 days after its creation will return anotFoundinDBFILESUploadSessionLookupError. 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 https://www.dropbox.com/developers/reference/data-transport-limit. By default, upload sessions require you to send content of the file in sequential order via consecutiveuploadSessionStart,uploadSessionAppend,uploadSessionFinishcalls. For better performance, you can instead optionally use aconcurrentinDBFILESUploadSessionTypeupload session. To start a new concurrent session, setsessionTypeinDBFILESUploadSessionStartArgtoconcurrentinDBFILESUploadSessionType. After that, you can send file data in concurrentuploadSessionAppendrequests. Finally finish the session withuploadSessionFinish. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStartoruploadSessionFinishcall, only withuploadSessionAppendcall. Also data uploaded inuploadSessionAppendcall must be multiple of 4194304 bytes (except for lastuploadSessionAppendwithcloseinDBFILESUploadSessionStartArgto true, that may contain any remaining data).Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESUploadSessionStartResult *, DBFILESUploadSessionStartError *> *) uploadSessionStartUrl:(nonnull NSString *)inputUrl;Swift
func uploadSessionStartUrl(_ inputUrl: String) -> DBUploadTask<DBFILESUploadSessionStartResult, DBFILESUploadSessionStartError>Parameters
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResultobject on success or aDBFILESUploadSessionStartErrorobject on failure. -
Upload sessions allow you to upload a single file in one or more requests, for example where the size of the file is greater than 150 MB. This call starts a new upload session with the given data. You can then use
uploadSessionAppendto add more data anduploadSessionFinishto save all the data to a file in Dropbox. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. An upload session can be used for a maximum of 7 days. Attempting to use ansessionIdinDBFILESUploadSessionStartResultwithuploadSessionAppendoruploadSessionFinishmore than 7 days after its creation will return anotFoundinDBFILESUploadSessionLookupError. 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 https://www.dropbox.com/developers/reference/data-transport-limit. By default, upload sessions require you to send content of the file in sequential order via consecutiveuploadSessionStart,uploadSessionAppend,uploadSessionFinishcalls. For better performance, you can instead optionally use aconcurrentinDBFILESUploadSessionTypeupload session. To start a new concurrent session, setsessionTypeinDBFILESUploadSessionStartArgtoconcurrentinDBFILESUploadSessionType. After that, you can send file data in concurrentuploadSessionAppendrequests. Finally finish the session withuploadSessionFinish. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStartoruploadSessionFinishcall, only withuploadSessionAppendcall. Also data uploaded inuploadSessionAppendcall must be multiple of 4194304 bytes (except for lastuploadSessionAppendwithcloseinDBFILESUploadSessionStartArgto true, that may contain any remaining data).Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESUploadSessionStartResult *, DBFILESUploadSessionStartError *> *) uploadSessionStartUrl:(nullable NSNumber *)close sessionType:(nullable DBFILESUploadSessionType *)sessionType contentHash:(nullable NSString *)contentHash inputUrl:(nonnull NSString *)inputUrl;Swift
func uploadSessionStartUrl(_ close: NSNumber?, sessionType: DBFILESUploadSessionType?, contentHash: String?, inputUrl: String) -> DBUploadTask<DBFILESUploadSessionStartResult, DBFILESUploadSessionStartError>Parameters
closeIf true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppendanymore with the current session.sessionTypeType of upload session you want to start. If not specified, default is
sequentialinDBFILESUploadSessionType.contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputUrlThe file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResultobject on success or aDBFILESUploadSessionStartErrorobject on failure. -
Upload sessions allow you to upload a single file in one or more requests, for example where the size of the file is greater than 150 MB. This call starts a new upload session with the given data. You can then use
uploadSessionAppendto add more data anduploadSessionFinishto save all the data to a file in Dropbox. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. An upload session can be used for a maximum of 7 days. Attempting to use ansessionIdinDBFILESUploadSessionStartResultwithuploadSessionAppendoruploadSessionFinishmore than 7 days after its creation will return anotFoundinDBFILESUploadSessionLookupError. 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 https://www.dropbox.com/developers/reference/data-transport-limit. By default, upload sessions require you to send content of the file in sequential order via consecutiveuploadSessionStart,uploadSessionAppend,uploadSessionFinishcalls. For better performance, you can instead optionally use aconcurrentinDBFILESUploadSessionTypeupload session. To start a new concurrent session, setsessionTypeinDBFILESUploadSessionStartArgtoconcurrentinDBFILESUploadSessionType. After that, you can send file data in concurrentuploadSessionAppendrequests. Finally finish the session withuploadSessionFinish. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStartoruploadSessionFinishcall, only withuploadSessionAppendcall. Also data uploaded inuploadSessionAppendcall must be multiple of 4194304 bytes (except for lastuploadSessionAppendwithcloseinDBFILESUploadSessionStartArgto true, that may contain any remaining data).Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESUploadSessionStartResult *, DBFILESUploadSessionStartError *> *) uploadSessionStartData:(nonnull NSData *)inputData;Swift
func uploadSessionStart(_ inputData: Data) -> DBUploadTask<DBFILESUploadSessionStartResult, DBFILESUploadSessionStartError>Parameters
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResultobject on success or aDBFILESUploadSessionStartErrorobject on failure. -
Upload sessions allow you to upload a single file in one or more requests, for example where the size of the file is greater than 150 MB. This call starts a new upload session with the given data. You can then use
uploadSessionAppendto add more data anduploadSessionFinishto save all the data to a file in Dropbox. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. An upload session can be used for a maximum of 7 days. Attempting to use ansessionIdinDBFILESUploadSessionStartResultwithuploadSessionAppendoruploadSessionFinishmore than 7 days after its creation will return anotFoundinDBFILESUploadSessionLookupError. 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 https://www.dropbox.com/developers/reference/data-transport-limit. By default, upload sessions require you to send content of the file in sequential order via consecutiveuploadSessionStart,uploadSessionAppend,uploadSessionFinishcalls. For better performance, you can instead optionally use aconcurrentinDBFILESUploadSessionTypeupload session. To start a new concurrent session, setsessionTypeinDBFILESUploadSessionStartArgtoconcurrentinDBFILESUploadSessionType. After that, you can send file data in concurrentuploadSessionAppendrequests. Finally finish the session withuploadSessionFinish. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStartoruploadSessionFinishcall, only withuploadSessionAppendcall. Also data uploaded inuploadSessionAppendcall must be multiple of 4194304 bytes (except for lastuploadSessionAppendwithcloseinDBFILESUploadSessionStartArgto true, that may contain any remaining data).Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESUploadSessionStartResult *, DBFILESUploadSessionStartError *> *) uploadSessionStartData:(nullable NSNumber *)close sessionType:(nullable DBFILESUploadSessionType *)sessionType contentHash:(nullable NSString *)contentHash inputData:(nonnull NSData *)inputData;Swift
func uploadSessionStartData(_ close: NSNumber?, sessionType: DBFILESUploadSessionType?, contentHash: String?, inputData: Data) -> DBUploadTask<DBFILESUploadSessionStartResult, DBFILESUploadSessionStartError>Parameters
closeIf true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppendanymore with the current session.sessionTypeType of upload session you want to start. If not specified, default is
sequentialinDBFILESUploadSessionType.contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputDataThe file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResultobject on success or aDBFILESUploadSessionStartErrorobject on failure. -
Upload sessions allow you to upload a single file in one or more requests, for example where the size of the file is greater than 150 MB. This call starts a new upload session with the given data. You can then use
uploadSessionAppendto add more data anduploadSessionFinishto save all the data to a file in Dropbox. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. An upload session can be used for a maximum of 7 days. Attempting to use ansessionIdinDBFILESUploadSessionStartResultwithuploadSessionAppendoruploadSessionFinishmore than 7 days after its creation will return anotFoundinDBFILESUploadSessionLookupError. 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 https://www.dropbox.com/developers/reference/data-transport-limit. By default, upload sessions require you to send content of the file in sequential order via consecutiveuploadSessionStart,uploadSessionAppend,uploadSessionFinishcalls. For better performance, you can instead optionally use aconcurrentinDBFILESUploadSessionTypeupload session. To start a new concurrent session, setsessionTypeinDBFILESUploadSessionStartArgtoconcurrentinDBFILESUploadSessionType. After that, you can send file data in concurrentuploadSessionAppendrequests. Finally finish the session withuploadSessionFinish. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStartoruploadSessionFinishcall, only withuploadSessionAppendcall. Also data uploaded inuploadSessionAppendcall must be multiple of 4194304 bytes (except for lastuploadSessionAppendwithcloseinDBFILESUploadSessionStartArgto true, that may contain any remaining data).Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESUploadSessionStartResult *, DBFILESUploadSessionStartError *> *) uploadSessionStartStream:(nonnull NSInputStream *)inputStream;Swift
func uploadSessionStart(_ inputStream: InputStream) -> DBUploadTask<DBFILESUploadSessionStartResult, DBFILESUploadSessionStartError>Parameters
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResultobject on success or aDBFILESUploadSessionStartErrorobject on failure. -
Upload sessions allow you to upload a single file in one or more requests, for example where the size of the file is greater than 150 MB. This call starts a new upload session with the given data. You can then use
uploadSessionAppendto add more data anduploadSessionFinishto save all the data to a file in Dropbox. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. An upload session can be used for a maximum of 7 days. Attempting to use ansessionIdinDBFILESUploadSessionStartResultwithuploadSessionAppendoruploadSessionFinishmore than 7 days after its creation will return anotFoundinDBFILESUploadSessionLookupError. 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 https://www.dropbox.com/developers/reference/data-transport-limit. By default, upload sessions require you to send content of the file in sequential order via consecutiveuploadSessionStart,uploadSessionAppend,uploadSessionFinishcalls. For better performance, you can instead optionally use aconcurrentinDBFILESUploadSessionTypeupload session. To start a new concurrent session, setsessionTypeinDBFILESUploadSessionStartArgtoconcurrentinDBFILESUploadSessionType. After that, you can send file data in concurrentuploadSessionAppendrequests. Finally finish the session withuploadSessionFinish. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStartoruploadSessionFinishcall, only withuploadSessionAppendcall. Also data uploaded inuploadSessionAppendcall must be multiple of 4194304 bytes (except for lastuploadSessionAppendwithcloseinDBFILESUploadSessionStartArgto true, that may contain any remaining data).Declaration
Objective-C
- (nonnull DBUploadTask<DBFILESUploadSessionStartResult *, DBFILESUploadSessionStartError *> *) uploadSessionStartStream:(nullable NSNumber *)close sessionType:(nullable DBFILESUploadSessionType *)sessionType contentHash:(nullable NSString *)contentHash inputStream:(nonnull NSInputStream *)inputStream;Swift
func uploadSessionStartStream(_ close: NSNumber?, sessionType: DBFILESUploadSessionType?, contentHash: String?, inputStream: InputStream) -> DBUploadTask<DBFILESUploadSessionStartResult, DBFILESUploadSessionStartError>Parameters
closeIf true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppendanymore with the current session.sessionTypeType of upload session you want to start. If not specified, default is
sequentialinDBFILESUploadSessionType.contentHashA hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.
inputStreamThe file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResultobject on success or aDBFILESUploadSessionStartErrorobject on failure. -
This route starts batch of upload_sessions. Please refer to
upload_session/startusage. 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 https://www.dropbox.com/developers/reference/data-transport-limit.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESUploadSessionStartBatchResult *, DBNilObject *> *) uploadSessionStartBatch:(nonnull NSNumber *)numSessions;Swift
func uploadSessionStartBatch(_ numSessions: NSNumber) -> DBRpcTask<DBFILESUploadSessionStartBatchResult, DBNilObject>Parameters
numSessionsThe number of upload sessions to start.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartBatchResultobject on success or avoidobject on failure. -
This route starts batch of upload_sessions. Please refer to
upload_session/startusage. 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 https://www.dropbox.com/developers/reference/data-transport-limit.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESUploadSessionStartBatchResult *, DBNilObject *> *) uploadSessionStartBatch:(nonnull NSNumber *)numSessions sessionType:(nullable DBFILESUploadSessionType *)sessionType;Swift
func uploadSessionStartBatch(_ numSessions: NSNumber, sessionType: DBFILESUploadSessionType?) -> DBRpcTask<DBFILESUploadSessionStartBatchResult, DBNilObject>Parameters
sessionTypeType of upload session you want to start. If not specified, default is
sequentialinDBFILESUploadSessionType.numSessionsThe number of upload sessions to start.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartBatchResultobject on success or avoidobject on failure.
-
Batch uploads small and large files.
This is a custom route built as a convenience layer over several Dropbox endpoints. Files will not only be batch uploaded, but large files will also automatically be chunk-uploaded to the Dropbox server, for maximum efficiency.
Note
The interface of this route does not have the same structure as other routes in the SDK. Here, a special
DBBatchUploadTaskobject is returned. Progress and response handlers are passed in directly to the route, rather than installed via this response object.@returns Special
DBBatchUploadTaskthat exposes cancellation method.Declaration
Objective-C
- (nonnull DBBatchUploadTask *) batchUploadFiles:(nonnull NSDictionary<NSURL *, DBFILESCommitInfo *> *) fileUrlsToCommitInfo queue:(nullable NSOperationQueue *)queue progressBlock:(DBProgressBlock _Nullable)progressBlock responseBlock:(nonnull DBBatchUploadResponseBlock)responseBlock;Swift
func batchUploadFiles(_ fileUrlsToCommitInfo: [URL : DBFILESCommitInfo], queue: OperationQueue?, progressBlock: DBProgressBlock?, responseBlock: @escaping DBBatchUploadResponseBlock) -> DBBatchUploadTaskParameters
fileUrlsToCommitInfoMap from the file urls of the files to upload to the corresponding commit info objects.
queueThe operation queue to execute progress / response handlers on. Main queue if
nilis passed.progressBlockThe progress block that is periodically executed once a file upload is complete. It’s important to note that this progress handler will update only when a file or file chunk is successfully uploaded. It will not give the client any progress notifications once all of the file data is uploaded, but not yet committed. Once the batch commit call is made, the client will have to simply wait for the server to commit all of the uploaded data, until the response handler is called.
responseBlockThe response block that is executed once all file uploads and the final batch commit is complete.
View on GitHub
DBFILESUserAuthRoutes Class Reference