DBFILESAppAuthRoutes

Objective-C

@interface DBFILESAppAuthRoutes : NSObject

Swift

class DBFILESAppAuthRoutes : 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 DBFILESAppAuthRoutes namespace container object with a networking client.

    Declaration

    Objective-C

    - (nonnull instancetype)init:(nonnull id<DBTransportClient>)client;
  • 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 an NSError 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 a DBFILESThumbnailV2Error 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 an NSError 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 a DBFILESThumbnailV2Error 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 an NSError 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 a DBFILESThumbnailV2Error 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 an NSError 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 a DBFILESThumbnailV2Error 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 a DBFILESThumbnailV2Error 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;

    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 a DBFILESThumbnailV2Error 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 a DBFILESThumbnailV2Error 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 a DBFILESThumbnailV2Error object on failure.