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
DBFILESUserAuthRoutes
namespace 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
DBFILESMetadata
object on success or aDBFILESAlphaGetMetadataError
object 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
includePropertyTemplates
If set to a valid list of template IDs,
propertyGroups
inDBFILESFileMetadata
is set for files with custom properties.Return Value
Through the response callback, the caller will receive a
DBFILESMetadata
object on success or aDBFILESAlphaGetMetadataError
object 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
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
contentHash
A 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.
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
contentHash
A 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.
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
contentHash
A 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.
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
DBFILESRelocationResult
object on success or aDBFILESRelocationError
object 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
allowSharedFolder
This flag has no effect.
autorename
If there’s a conflict, have the Dropbox server try to autorename the file to avoid the conflict.
allowOwnershipTransfer
Allow 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
DBFILESRelocationResult
object on success or aDBFILESRelocationError
object 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
DBFILESMetadata
object on success or aDBFILESRelocationError
object 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
allowSharedFolder
This flag has no effect.
autorename
If there’s a conflict, have the Dropbox server try to autorename the file to avoid the conflict.
allowOwnershipTransfer
Allow 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
DBFILESMetadata
object on success or aDBFILESRelocationError
object 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, whiledCopyBatch
raises 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 usedCopyBatchCheck
to 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
entries
List of entries to be moved or copied. Each entry is RelocationPath.
Return Value
Through the response callback, the caller will receive a
DBFILESRelocationBatchV2Launch
object on success or avoid
object 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, whiledCopyBatch
raises 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 usedCopyBatchCheck
to 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
entries
List of entries to be moved or copied. Each entry is RelocationPath.
autorename
If 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
DBFILESRelocationBatchV2Launch
object on success or avoid
object 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
dCopyBatchCheck
to 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
DBFILESRelocationBatchLaunch
object on success or avoid
object 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
dCopyBatchCheck
to 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
allowSharedFolder
This flag has no effect.
allowOwnershipTransfer
Allow 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
DBFILESRelocationBatchLaunch
object on success or avoid
object 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
asyncJobId
Id 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
DBFILESRelocationBatchV2JobStatus
object on success or aDBASYNCPollError
object 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
asyncJobId
Id 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
DBFILESRelocationBatchJobStatus
object on success or aDBASYNCPollError
object 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
path
The 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
DBFILESGetCopyReferenceResult
object on success or aDBFILESGetCopyReferenceError
object on failure. -
Save a copy reference returned by
dCopyReferenceGet
to 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
dCopyReference
A copy reference returned by
dCopyReferenceGet
.path
Path in the user’s Dropbox that is the destination.
Return Value
Through the response callback, the caller will receive a
DBFILESSaveCopyReferenceResult
object on success or aDBFILESSaveCopyReferenceError
object 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
path
Path in the user’s Dropbox to create.
Return Value
Through the response callback, the caller will receive a
DBFILESCreateFolderResult
object on success or aDBFILESCreateFolderError
object 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
path
Path in the user’s Dropbox to create.
autorename
If 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
DBFILESCreateFolderResult
object on success or aDBFILESCreateFolderError
object 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
path
Path in the user’s Dropbox to create.
Return Value
Through the response callback, the caller will receive a
DBFILESFolderMetadata
object on success or aDBFILESCreateFolderError
object 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
path
Path in the user’s Dropbox to create.
autorename
If 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
DBFILESFolderMetadata
object on success or aDBFILESCreateFolderError
object 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
forceAsync
inDBFILESCreateFolderBatchArg
flag. UsecreateFolderBatchCheck
to 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
paths
List 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
DBFILESCreateFolderBatchLaunch
object on success or avoid
object 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
forceAsync
inDBFILESCreateFolderBatchArg
flag. UsecreateFolderBatchCheck
to 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
paths
List of paths to be created in the user’s Dropbox. Duplicate path arguments in the batch are considered only once.
autorename
If there’s a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.
forceAsync
Whether to force the create to happen asynchronously.
Return Value
Through the response callback, the caller will receive a
DBFILESCreateFolderBatchLaunch
object on success or avoid
object 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
asyncJobId
Id 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
DBFILESCreateFolderBatchJobStatus
object on success or aDBASYNCPollError
object 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
path
Path in the user’s Dropbox to delete.
Return Value
Through the response callback, the caller will receive a
DBFILESDeleteResult
object on success or aDBFILESDeleteError
object 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
path
Path in the user’s Dropbox to delete.
parentRev
Perform 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
DBFILESDeleteResult
object on success or aDBFILESDeleteError
object 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
path
Path in the user’s Dropbox to delete.
Return Value
Through the response callback, the caller will receive a
DBFILESMetadata
object on success or aDBFILESDeleteError
object 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
path
Path in the user’s Dropbox to delete.
parentRev
Perform 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
DBFILESMetadata
object on success or aDBFILESDeleteError
object 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
deleteBatchCheck
to 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
DBFILESDeleteBatchLaunch
object on success or avoid
object 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
asyncJobId
Id 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
DBFILESDeleteBatchJobStatus
object on success or aDBASYNCPollError
object 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
path
The path of the file to download.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESDownloadError
object 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
path
The path of the file to download.
rev
Please specify revision in path instead.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESDownloadError
object 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
path
The path of the file to download.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESDownloadError
object 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
path
The path of the file to download.
rev
Please specify revision in path instead.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESDownloadError
object 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
path
The path of the file to download.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESDownloadError
object 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
path
The path of the file to download.
rev
Please specify revision in path instead.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESDownloadError
object 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
path
The path of the file to download.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESDownloadError
object 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
path
The path of the file to download.
rev
Please specify revision in path instead.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESDownloadError
object 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
path
The path of the folder to download.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESDownloadZipResult
object on success or aDBFILESDownloadZipError
object 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
path
The path of the folder to download.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESDownloadZipResult
object on success or aDBFILESDownloadZipError
object 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
path
The path of the folder to download.
Return Value
Through the response callback, the caller will receive a
DBFILESDownloadZipResult
object on success or aDBFILESDownloadZipError
object 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
path
The path of the folder to download.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESDownloadZipResult
object on success or aDBFILESDownloadZipError
object on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadata
inDBFILESExportResult
hasexportAs
inDBFILESExportInfo
populated.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
path
The path of the file to be exported.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESExportResult
object on success or aDBFILESExportError
object on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadata
inDBFILESExportResult
hasexportAs
inDBFILESExportInfo
populated.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
path
The path of the file to be exported.
exportFormat
The 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.overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESExportResult
object on success or aDBFILESExportError
object on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadata
inDBFILESExportResult
hasexportAs
inDBFILESExportInfo
populated.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
path
The path of the file to be exported.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESExportResult
object on success or aDBFILESExportError
object on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadata
inDBFILESExportResult
hasexportAs
inDBFILESExportInfo
populated.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
path
The path of the file to be exported.
exportFormat
The 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.overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESExportResult
object on success or aDBFILESExportError
object on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadata
inDBFILESExportResult
hasexportAs
inDBFILESExportInfo
populated.Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESExportResult *, DBFILESExportError *> *) exportData:(nonnull NSString *)path;
Swift
func exportData(_ path: String) -> DBDownloadDataTask<DBFILESExportResult, DBFILESExportError>
Parameters
path
The path of the file to be exported.
Return Value
Through the response callback, the caller will receive a
DBFILESExportResult
object on success or aDBFILESExportError
object on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadata
inDBFILESExportResult
hasexportAs
inDBFILESExportInfo
populated.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
path
The path of the file to be exported.
exportFormat
The 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
DBFILESExportResult
object on success or aDBFILESExportError
object on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadata
inDBFILESExportResult
hasexportAs
inDBFILESExportInfo
populated.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
path
The path of the file to be exported.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESExportResult
object on success or aDBFILESExportError
object on failure. -
Export a file from a user’s Dropbox. This route only supports exporting files that cannot be downloaded directly and whose
fileMetadata
inDBFILESExportResult
hasexportAs
inDBFILESExportInfo
populated.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
path
The path of the file to be exported.
exportFormat
The 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.byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESExportResult
object on success or aDBFILESExportError
object 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
entries
List 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
DBFILESLockFileBatchResult
object on success or aDBFILESLockFileError
object 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
path
The path of a file or folder on Dropbox.
Return Value
Through the response callback, the caller will receive a
DBFILESMetadata
object on success or aDBFILESGetMetadataError
object 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
path
The path of a file or folder on Dropbox.
includeMediaInfo
If true,
mediaInfo
inDBFILESFileMetadata
is set for photo and video.includeDeleted
If true, DeletedMetadata will be returned for deleted file or folder, otherwise
notFound
inDBFILESLookupError
will be returned.includeHasExplicitSharedMembers
If true, the results will include a flag for each file indicating whether or not that file has any explicit members.
includePropertyGroups
If set to a valid list of template IDs,
propertyGroups
inDBFILESFileMetadata
is 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
DBFILESMetadata
object on success or aDBFILESGetMetadataError
object 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
path
The path of the file to preview.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESPreviewError
object 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
path
The path of the file to preview.
rev
Please specify revision in path instead.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESPreviewError
object 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
path
The path of the file to preview.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESPreviewError
object 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
path
The path of the file to preview.
rev
Please specify revision in path instead.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESPreviewError
object 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
path
The path of the file to preview.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESPreviewError
object 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
path
The path of the file to preview.
rev
Please specify revision in path instead.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESPreviewError
object 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
path
The path of the file to preview.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESPreviewError
object 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
path
The path of the file to preview.
rev
Please specify revision in path instead.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESPreviewError
object 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
path
The path to the file you want a temporary link to.
Return Value
Through the response callback, the caller will receive a
DBFILESGetTemporaryLinkResult
object on success or aDBFILESGetTemporaryLinkError
object 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 togetTemporaryUploadLink
but 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
commitInfo
Contains 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
DBFILESGetTemporaryUploadLinkResult
object on success or avoid
object 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 togetTemporaryUploadLink
but 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
commitInfo
Contains the path and other optional modifiers for the future upload commit. Equivalent to the parameters provided to
upload
.duration
How 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
DBFILESGetTemporaryUploadLinkResult
object on success or avoid
object 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
path
The path to the image file you want to thumbnail.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESThumbnailError
object 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
path
The path to the image file you want to thumbnail.
format
The 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.
size
The size for the thumbnail image.
mode
How to resize and crop the image to achieve the desired size.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESThumbnailError
object 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
path
The path to the image file you want to thumbnail.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESThumbnailError
object 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
path
The path to the image file you want to thumbnail.
format
The 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.
size
The size for the thumbnail image.
mode
How to resize and crop the image to achieve the desired size.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESThumbnailError
object 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
path
The path to the image file you want to thumbnail.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESThumbnailError
object 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
path
The path to the image file you want to thumbnail.
format
The 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.
size
The size for the thumbnail image.
mode
How to resize and crop the image to achieve the desired size.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESThumbnailError
object 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
path
The path to the image file you want to thumbnail.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESThumbnailError
object 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
path
The path to the image file you want to thumbnail.
format
The 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.
size
The size for the thumbnail image.
mode
How to resize and crop the image to achieve the desired size.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESFileMetadata
object on success or aDBFILESThumbnailError
object 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
resource
Information 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.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResult
object on success or aDBFILESThumbnailV2Error
object 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
resource
Information 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.
format
The 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.
size
The size for the thumbnail image.
mode
How to resize and crop the image to achieve the desired size.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResult
object on success or aDBFILESThumbnailV2Error
object 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
resource
Information 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.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESPreviewResult
object on success or aDBFILESThumbnailV2Error
object 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
resource
Information 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.
format
The 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.
size
The size for the thumbnail image.
mode
How to resize and crop the image to achieve the desired size.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESPreviewResult
object on success or aDBFILESThumbnailV2Error
object 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
resource
Information 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
DBFILESPreviewResult
object on success or aDBFILESThumbnailV2Error
object 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
resource
Information 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.
format
The 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.
size
The size for the thumbnail image.
mode
How to resize and crop the image to achieve the desired size.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResult
object on success or aDBFILESThumbnailV2Error
object 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
resource
Information 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.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESPreviewResult
object on success or aDBFILESThumbnailV2Error
object 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
resource
Information 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.
format
The 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.
size
The size for the thumbnail image.
mode
How to resize and crop the image to achieve the desired size.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For 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
DBFILESPreviewResult
object on success or aDBFILESThumbnailV2Error
object 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
entries
List of files to get thumbnails.
Return Value
Through the response callback, the caller will receive a
DBFILESGetThumbnailBatchResult
object on success or aDBFILESGetThumbnailBatchError
object on failure. -
Starts returning the contents of a folder. If the result’s
hasMore
inDBFILESListFolderResult
field is true, calllistFolderContinue
with the returnedcursor
inDBFILESListFolderResult
to retrieve more entries. If you’re usingrecursive
inDBFILESListFolderArg
set 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’sreadOnly
inDBFILESFolderSharingInfo
and 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 multiplelistFolder
orlistFolderContinue
calls 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
path
A unique identifier for the file.
Return Value
Through the response callback, the caller will receive a
DBFILESListFolderResult
object on success or aDBFILESListFolderError
object on failure. -
-listFolder:
recursive: includeMediaInfo: includeDeleted: includeHasExplicitSharedMembers: includeMountedFolders: limit: sharedLink: includePropertyGroups: includeNonDownloadableFiles: Starts returning the contents of a folder. If the result’s
hasMore
inDBFILESListFolderResult
field is true, calllistFolderContinue
with the returnedcursor
inDBFILESListFolderResult
to retrieve more entries. If you’re usingrecursive
inDBFILESListFolderArg
set 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’sreadOnly
inDBFILESFolderSharingInfo
and 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 multiplelistFolder
orlistFolderContinue
calls 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
path
A unique identifier for the file.
recursive
If true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders.
includeMediaInfo
If true,
mediaInfo
inDBFILESFileMetadata
is set for photo and video. This parameter will no longer have an effect starting December 2, 2019.includeDeleted
If true, the results will include entries for files and folders that used to exist but were deleted.
includeHasExplicitSharedMembers
If true, the results will include a flag for each file indicating whether or not that file has any explicit members.
includeMountedFolders
If true, the results will include entries under mounted folders which includes app folder, shared folder and team folder.
limit
The 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.
sharedLink
A shared link to list the contents of. If the link is password-protected, the password must be provided. If this field is present,
path
inDBFILESListFolderArg
will be relative to root of the shared link. Only non-recursive mode is supported for shared link.includePropertyGroups
If set to a valid list of template IDs,
propertyGroups
inDBFILESFileMetadata
is set if there exists property data associated with the file and each of the listed templates.includeNonDownloadableFiles
If true, include files that are not downloadable, i.e. Google Docs.
Return Value
Through the response callback, the caller will receive a
DBFILESListFolderResult
object on success or aDBFILESListFolderError
object 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
cursor
The cursor returned by your last call to
listFolder
orlistFolderContinue
.Return Value
Through the response callback, the caller will receive a
DBFILESListFolderResult
object on success or aDBFILESListFolderContinueError
object on failure. -
A way to quickly get a cursor for the folder’s state. Unlike
listFolder
,listFolderGetLatestCursor
doesn’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
path
A unique identifier for the file.
Return Value
Through the response callback, the caller will receive a
DBFILESListFolderGetLatestCursorResult
object on success or aDBFILESListFolderError
object 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
,listFolderGetLatestCursor
doesn’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
path
A unique identifier for the file.
recursive
If true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders.
includeMediaInfo
If true,
mediaInfo
inDBFILESFileMetadata
is set for photo and video. This parameter will no longer have an effect starting December 2, 2019.includeDeleted
If true, the results will include entries for files and folders that used to exist but were deleted.
includeHasExplicitSharedMembers
If true, the results will include a flag for each file indicating whether or not that file has any explicit members.
includeMountedFolders
If true, the results will include entries under mounted folders which includes app folder, shared folder and team folder.
limit
The 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.
sharedLink
A shared link to list the contents of. If the link is password-protected, the password must be provided. If this field is present,
path
inDBFILESListFolderArg
will be relative to root of the shared link. Only non-recursive mode is supported for shared link.includePropertyGroups
If set to a valid list of template IDs,
propertyGroups
inDBFILESFileMetadata
is set if there exists property data associated with the file and each of the listed templates.includeNonDownloadableFiles
If true, include files that are not downloadable, i.e. Google Docs.
Return Value
Through the response callback, the caller will receive a
DBFILESListFolderGetLatestCursorResult
object on success or aDBFILESListFolderError
object 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
cursor
A cursor as returned by
listFolder
orlistFolderContinue
. Cursors retrieved by settingincludeMediaInfo
inDBFILESListFolderArg
to true are not supported.Return Value
Through the response callback, the caller will receive a
DBFILESListFolderLongpollResult
object on success or aDBFILESListFolderLongpollError
object 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
cursor
A cursor as returned by
listFolder
orlistFolderContinue
. Cursors retrieved by settingincludeMediaInfo
inDBFILESListFolderArg
to true are not supported.timeout
A 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
DBFILESListFolderLongpollResult
object on success or aDBFILESListFolderLongpollError
object 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
path
inDBFILESListRevisionsMode
(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_
inDBFILESListRevisionsMode
mode 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
path
The path to the file you want to see the revisions of.
Return Value
Through the response callback, the caller will receive a
DBFILESListRevisionsResult
object on success or aDBFILESListRevisionsError
object 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
path
inDBFILESListRevisionsMode
(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_
inDBFILESListRevisionsMode
mode 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
path
The path to the file you want to see the revisions of.
mode
Determines the behavior of the API in listing the revisions for a given file path or id.
limit
The maximum number of revision entries returned.
Return Value
Through the response callback, the caller will receive a
DBFILESListRevisionsResult
object on success or aDBFILESListRevisionsError
object 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
entries
List 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
DBFILESLockFileBatchResult
object on success or aDBFILESLockFileError
object 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
DBFILESRelocationResult
object on success or aDBFILESRelocationError
object 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
allowSharedFolder
This flag has no effect.
autorename
If there’s a conflict, have the Dropbox server try to autorename the file to avoid the conflict.
allowOwnershipTransfer
Allow 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
DBFILESRelocationResult
object on success or aDBFILESRelocationError
object 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
DBFILESMetadata
object on success or aDBFILESRelocationError
object 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
allowSharedFolder
This flag has no effect.
autorename
If there’s a conflict, have the Dropbox server try to autorename the file to avoid the conflict.
allowOwnershipTransfer
Allow 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
DBFILESMetadata
object on success or aDBFILESRelocationError
object 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, whilemoveBatch
raises 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 usemoveBatchCheck
to 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
DBFILESRelocationBatchV2Launch
object on success or avoid
object 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, whilemoveBatch
raises 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 usemoveBatchCheck
to 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
allowOwnershipTransfer
Allow 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
DBFILESRelocationBatchV2Launch
object on success or avoid
object 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
moveBatchCheck
to 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
DBFILESRelocationBatchLaunch
object on success or avoid
object 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
moveBatchCheck
to 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
allowSharedFolder
This flag has no effect.
allowOwnershipTransfer
Allow 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
DBFILESRelocationBatchLaunch
object on success or avoid
object 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
asyncJobId
Id 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
DBFILESRelocationBatchV2JobStatus
object on success or aDBASYNCPollError
object 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
asyncJobId
Id 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
DBFILESRelocationBatchJobStatus
object on success or aDBASYNCPollError
object 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
path
The 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.
importFormat
The format of the provided data.
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperCreateResult
object on success or aDBFILESPaperCreateError
object 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
path
The 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.
importFormat
The format of the provided data.
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperCreateResult
object on success or aDBFILESPaperCreateError
object 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
path
The 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.
importFormat
The format of the provided data.
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperCreateResult
object on success or aDBFILESPaperCreateError
object 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
path
Path in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormat
The format of the provided data.
docUpdatePolicy
How the provided content should be applied to the doc.
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResult
object on success or aDBFILESPaperUpdateError
object 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
path
Path in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormat
The format of the provided data.
docUpdatePolicy
How the provided content should be applied to the doc.
paperRevision
The 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.
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResult
object on success or aDBFILESPaperUpdateError
object 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
path
Path in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormat
The format of the provided data.
docUpdatePolicy
How the provided content should be applied to the doc.
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResult
object on success or aDBFILESPaperUpdateError
object 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
path
Path in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormat
The format of the provided data.
docUpdatePolicy
How the provided content should be applied to the doc.
paperRevision
The 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.
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResult
object on success or aDBFILESPaperUpdateError
object 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
path
Path in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormat
The format of the provided data.
docUpdatePolicy
How the provided content should be applied to the doc.
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResult
object on success or aDBFILESPaperUpdateError
object 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
path
Path in the user’s Dropbox to update. The path must correspond to a Paper doc or an error will be returned.
importFormat
The format of the provided data.
docUpdatePolicy
How the provided content should be applied to the doc.
paperRevision
The 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.
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESPaperUpdateResult
object on success or aDBFILESPaperUpdateError
object 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
path
Path in the user’s Dropbox to delete.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESDeleteError
object 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
path
Path in the user’s Dropbox to delete.
parentRev
Perform 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
void
object on success or aDBFILESDeleteError
object 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
path
A unique identifier for the file or folder.
propertyGroups
The 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
void
object on success or aDBFILEPROPERTIESAddPropertiesError
object 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
path
A unique identifier for the file or folder.
propertyGroups
The 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
void
object on success or aDBFILEPROPERTIESInvalidPropertyGroupError
object 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
path
A unique identifier for the file or folder.
propertyTemplateIds
A list of identifiers for a template created by
templatesAddForUser
ortemplatesAddForTeam
.Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILEPROPERTIESRemovePropertiesError
object 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
templateId
An identifier for template added by route See
templatesAddForUser
ortemplatesAddForTeam
.Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESGetTemplateResult
object on success or aDBFILEPROPERTIESTemplateError
object 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
DBFILEPROPERTIESListTemplateResult
object on success or aDBFILEPROPERTIESTemplateError
object 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
path
A unique identifier for the file or folder.
updatePropertyGroups
The property groups “delta” updates to apply.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILEPROPERTIESUpdatePropertiesError
object 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
path
The path to save the restored file.
rev
The revision to restore.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESRestoreError
object 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
path
The path in Dropbox where the URL will be saved to.
url
The URL to be saved.
Return Value
Through the response callback, the caller will receive a
DBFILESSaveUrlResult
object on success or aDBFILESSaveUrlError
object on failure. -
Check the status of a
saveUrl
job.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESSaveUrlJobStatus *, DBASYNCPollError *> *) saveUrlCheckJobStatus:(nonnull NSString *)asyncJobId;
Swift
func saveUrlCheckJobStatus(_ asyncJobId: String) -> DBRpcTask<DBFILESSaveUrlJobStatus, DBASYNCPollError>
Parameters
asyncJobId
Id 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
DBFILESSaveUrlJobStatus
object on success or aDBASYNCPollError
object 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
path
The path in the user’s Dropbox to search. Should probably be a folder.
query
The 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
DBFILESSearchResult
object on success or aDBFILESSearchError
object 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
path
The path in the user’s Dropbox to search. Should probably be a folder.
query
The 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”).
start
The starting index within the search results (used for paging).
maxResults
The maximum number of search results to return.
mode
The 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
DBFILESSearchResult
object on success or aDBFILESSearchError
object on failure. -
Searches for files and folders. Note:
search
along withsearchContinue
can 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
query
The 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
DBFILESSearchV2Result
object on success or aDBFILESSearchError
object on failure. -
Searches for files and folders. Note:
search
along withsearchContinue
can 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
query
The string to search for. May match across multiple fields based on the request arguments.
options
Options for more targeted search results.
matchFieldOptions
Options for search results match fields.
includeHighlights
Deprecated and moved this option to SearchMatchFieldOptions.
Return Value
Through the response callback, the caller will receive a
DBFILESSearchV2Result
object on success or aDBFILESSearchError
object on failure. -
Fetches the next page of search results returned from
search
. Note:search
along withsearchContinue
can 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
cursor
The 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
DBFILESSearchV2Result
object on success or aDBFILESSearchError
object 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
path
Path to the item to be tagged.
tagText
The value of the tag to add. Will be automatically converted to lowercase letters.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESAddTagError
object 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
paths
Path to the items.
Return Value
Through the response callback, the caller will receive a
DBFILESGetTagsResult
object on success or aDBFILESBaseTagError
object 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
path
Path to the item to tag.
tagText
The tag to remove. Will be automatically converted to lowercase letters.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESRemoveTagError
object 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
entries
List 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
DBFILESLockFileBatchResult
object on success or aDBFILESLockFileError
object 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
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
contentHash
A 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.
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
contentHash
A 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.
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
contentHash
A 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.
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadError
object 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
cursor
Contains the upload session ID and the offset.
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESUploadSessionAppendError
object 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
cursor
Contains the upload session ID and the offset.
close
If true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppend
anymore with the current session.contentHash
A 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.
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESUploadSessionAppendError
object 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
cursor
Contains the upload session ID and the offset.
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESUploadSessionAppendError
object 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
cursor
Contains the upload session ID and the offset.
close
If true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppend
anymore with the current session.contentHash
A 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.
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESUploadSessionAppendError
object 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
cursor
Contains the upload session ID and the offset.
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESUploadSessionAppendError
object 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
cursor
Contains the upload session ID and the offset.
close
If true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppend
anymore with the current session.contentHash
A 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.
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESUploadSessionAppendError
object 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
sessionId
The upload session ID (returned by
uploadSessionStart
).offset
Offset 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.
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESUploadSessionAppendError
object 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
sessionId
The upload session ID (returned by
uploadSessionStart
).offset
Offset 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.
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESUploadSessionAppendError
object 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
sessionId
The upload session ID (returned by
uploadSessionStart
).offset
Offset 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.
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILESUploadSessionAppendError
object 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
cursor
Contains the upload session ID and the offset.
commit
Contains the path and other optional modifiers for the commit.
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadSessionFinishError
object 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
cursor
Contains the upload session ID and the offset.
commit
Contains the path and other optional modifiers for the commit.
contentHash
A 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.
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadSessionFinishError
object 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
cursor
Contains the upload session ID and the offset.
commit
Contains the path and other optional modifiers for the commit.
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadSessionFinishError
object 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
cursor
Contains the upload session ID and the offset.
commit
Contains the path and other optional modifiers for the commit.
contentHash
A 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.
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadSessionFinishError
object 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
cursor
Contains the upload session ID and the offset.
commit
Contains the path and other optional modifiers for the commit.
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadSessionFinishError
object 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
cursor
Contains the upload session ID and the offset.
commit
Contains the path and other optional modifiers for the commit.
contentHash
A 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.
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESFileMetadata
object on success or aDBFILESUploadSessionFinishError
object on failure. -
Deprecated
uploadSessionFinishBatch is deprecated. Use uploadSessionFinishBatch.
DEPRECATED: This route helps you commit many files at once into a user’s Dropbox. Use
uploadSessionStart
anduploadSessionAppend
to 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.close
inDBFILESUploadSessionStartArg
orclose
inDBFILESUploadSessionAppendArg
needs to be true for the lastuploadSessionStart
oruploadSessionAppend
call. 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. UseuploadSessionFinishBatchCheck
to 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
entries
Commit information for each file in the batch.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionFinishBatchLaunch
object on success or avoid
object on failure. -
This route helps you commit many files at once into a user’s Dropbox. Use
uploadSessionStart
anduploadSessionAppend
to 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.close
inDBFILESUploadSessionStartArg
orclose
inDBFILESUploadSessionAppendArg
needs to be true for the lastuploadSessionStart
oruploadSessionAppend
call 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
entries
Commit information for each file in the batch.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionFinishBatchResult
object on success or avoid
object 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
asyncJobId
Id 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
DBFILESUploadSessionFinishBatchJobStatus
object on success or aDBASYNCPollError
object 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
uploadSessionAppend
to add more data anduploadSessionFinish
to 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 ansessionId
inDBFILESUploadSessionStartResult
withuploadSessionAppend
oruploadSessionFinish
more than 7 days after its creation will return anotFound
inDBFILESUploadSessionLookupError
. 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
,uploadSessionFinish
calls. For better performance, you can instead optionally use aconcurrent
inDBFILESUploadSessionType
upload session. To start a new concurrent session, setsessionType
inDBFILESUploadSessionStartArg
toconcurrent
inDBFILESUploadSessionType
. After that, you can send file data in concurrentuploadSessionAppend
requests. Finally finish the session withuploadSessionFinish
. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStart
oruploadSessionFinish
call, only withuploadSessionAppend
call. Also data uploaded inuploadSessionAppend
call must be multiple of 4194304 bytes (except for lastuploadSessionAppend
withclose
inDBFILESUploadSessionStartArg
to 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
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResult
object on success or aDBFILESUploadSessionStartError
object 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
uploadSessionAppend
to add more data anduploadSessionFinish
to 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 ansessionId
inDBFILESUploadSessionStartResult
withuploadSessionAppend
oruploadSessionFinish
more than 7 days after its creation will return anotFound
inDBFILESUploadSessionLookupError
. 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
,uploadSessionFinish
calls. For better performance, you can instead optionally use aconcurrent
inDBFILESUploadSessionType
upload session. To start a new concurrent session, setsessionType
inDBFILESUploadSessionStartArg
toconcurrent
inDBFILESUploadSessionType
. After that, you can send file data in concurrentuploadSessionAppend
requests. Finally finish the session withuploadSessionFinish
. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStart
oruploadSessionFinish
call, only withuploadSessionAppend
call. Also data uploaded inuploadSessionAppend
call must be multiple of 4194304 bytes (except for lastuploadSessionAppend
withclose
inDBFILESUploadSessionStartArg
to 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
close
If true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppend
anymore with the current session.sessionType
Type of upload session you want to start. If not specified, default is
sequential
inDBFILESUploadSessionType
.contentHash
A 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.
inputUrl
The file to upload, as an NSString * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResult
object on success or aDBFILESUploadSessionStartError
object 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
uploadSessionAppend
to add more data anduploadSessionFinish
to 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 ansessionId
inDBFILESUploadSessionStartResult
withuploadSessionAppend
oruploadSessionFinish
more than 7 days after its creation will return anotFound
inDBFILESUploadSessionLookupError
. 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
,uploadSessionFinish
calls. For better performance, you can instead optionally use aconcurrent
inDBFILESUploadSessionType
upload session. To start a new concurrent session, setsessionType
inDBFILESUploadSessionStartArg
toconcurrent
inDBFILESUploadSessionType
. After that, you can send file data in concurrentuploadSessionAppend
requests. Finally finish the session withuploadSessionFinish
. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStart
oruploadSessionFinish
call, only withuploadSessionAppend
call. Also data uploaded inuploadSessionAppend
call must be multiple of 4194304 bytes (except for lastuploadSessionAppend
withclose
inDBFILESUploadSessionStartArg
to 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
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResult
object on success or aDBFILESUploadSessionStartError
object 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
uploadSessionAppend
to add more data anduploadSessionFinish
to 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 ansessionId
inDBFILESUploadSessionStartResult
withuploadSessionAppend
oruploadSessionFinish
more than 7 days after its creation will return anotFound
inDBFILESUploadSessionLookupError
. 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
,uploadSessionFinish
calls. For better performance, you can instead optionally use aconcurrent
inDBFILESUploadSessionType
upload session. To start a new concurrent session, setsessionType
inDBFILESUploadSessionStartArg
toconcurrent
inDBFILESUploadSessionType
. After that, you can send file data in concurrentuploadSessionAppend
requests. Finally finish the session withuploadSessionFinish
. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStart
oruploadSessionFinish
call, only withuploadSessionAppend
call. Also data uploaded inuploadSessionAppend
call must be multiple of 4194304 bytes (except for lastuploadSessionAppend
withclose
inDBFILESUploadSessionStartArg
to 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
close
If true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppend
anymore with the current session.sessionType
Type of upload session you want to start. If not specified, default is
sequential
inDBFILESUploadSessionType
.contentHash
A 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.
inputData
The file to upload, as an NSData * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResult
object on success or aDBFILESUploadSessionStartError
object 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
uploadSessionAppend
to add more data anduploadSessionFinish
to 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 ansessionId
inDBFILESUploadSessionStartResult
withuploadSessionAppend
oruploadSessionFinish
more than 7 days after its creation will return anotFound
inDBFILESUploadSessionLookupError
. 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
,uploadSessionFinish
calls. For better performance, you can instead optionally use aconcurrent
inDBFILESUploadSessionType
upload session. To start a new concurrent session, setsessionType
inDBFILESUploadSessionStartArg
toconcurrent
inDBFILESUploadSessionType
. After that, you can send file data in concurrentuploadSessionAppend
requests. Finally finish the session withuploadSessionFinish
. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStart
oruploadSessionFinish
call, only withuploadSessionAppend
call. Also data uploaded inuploadSessionAppend
call must be multiple of 4194304 bytes (except for lastuploadSessionAppend
withclose
inDBFILESUploadSessionStartArg
to 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
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResult
object on success or aDBFILESUploadSessionStartError
object 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
uploadSessionAppend
to add more data anduploadSessionFinish
to 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 ansessionId
inDBFILESUploadSessionStartResult
withuploadSessionAppend
oruploadSessionFinish
more than 7 days after its creation will return anotFound
inDBFILESUploadSessionLookupError
. 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
,uploadSessionFinish
calls. For better performance, you can instead optionally use aconcurrent
inDBFILESUploadSessionType
upload session. To start a new concurrent session, setsessionType
inDBFILESUploadSessionStartArg
toconcurrent
inDBFILESUploadSessionType
. After that, you can send file data in concurrentuploadSessionAppend
requests. Finally finish the session withuploadSessionFinish
. There are couple of constraints with concurrent sessions to make them work. You can not send data withuploadSessionStart
oruploadSessionFinish
call, only withuploadSessionAppend
call. Also data uploaded inuploadSessionAppend
call must be multiple of 4194304 bytes (except for lastuploadSessionAppend
withclose
inDBFILESUploadSessionStartArg
to 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
close
If true, the current session will be closed, at which point you won’t be able to call
uploadSessionAppend
anymore with the current session.sessionType
Type of upload session you want to start. If not specified, default is
sequential
inDBFILESUploadSessionType
.contentHash
A 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.
inputStream
The file to upload, as an NSInputStream * object.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartResult
object on success or aDBFILESUploadSessionStartError
object on failure. -
This route starts batch of upload_sessions. Please refer to
upload_session/start
usage. 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
numSessions
The number of upload sessions to start.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartBatchResult
object on success or avoid
object on failure. -
This route starts batch of upload_sessions. Please refer to
upload_session/start
usage. 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
sessionType
Type of upload session you want to start. If not specified, default is
sequential
inDBFILESUploadSessionType
.numSessions
The number of upload sessions to start.
Return Value
Through the response callback, the caller will receive a
DBFILESUploadSessionStartBatchResult
object on success or avoid
object 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
DBBatchUploadTask
object is returned. Progress and response handlers are passed in directly to the route, rather than installed via this response object.@returns Special
DBBatchUploadTask
that 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) -> DBBatchUploadTask
Parameters
fileUrlsToCommitInfo
Map from the file urls of the files to upload to the corresponding commit info objects.
queue
The operation queue to execute progress / response handlers on. Main queue if
nil
is passed.progressBlock
The 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.
responseBlock
The response block that is executed once all file uploads and the final batch commit is complete.