Back to DropboxFiles - Get Thumbnail Batch
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 and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail.
Input
type: object
properties:
data:
type: object
description: |
Arguments for :route:`get_thumbnail_batch`.
entries: List of files to get thumbnails.
properties:
entries:
type: array
description: List of files to get thumbnails.
items:
type: object
description: >
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.
properties:
path:
type: string
description: The path to the image file you want to thumbnail.
size:
type: object
description: |
w32h32: 32 by 32 px.
w64h64: 64 by 64 px.
w128h128: 128 by 128 px.
w256h256: 256 by 256 px.
w480h320: 480 by 320 px.
w640h480: 640 by 480 px.
w960h640: 960 by 640 px.
w1024h768: 1024 by 768 px.
w2048h1536: 2048 by 1536 px.
properties:
.tag:
title: Choice of ThumbnailSize
type: string
enum:
- w32h32
- w64h64
- w128h128
- w256h256
- w480h320
- w640h480
- w960h640
- w1024h768
- w2048h1536
mode:
type: object
description: >
strict: Scale down the image to fit within the given size.
bestfit: Scale down the image to fit within the given size or
its transpose.
fitone_bestfit: Scale down the image to completely cover the
given size or its transpose.
properties:
.tag:
title: Choice of ThumbnailMode
type: string
enum:
- strict
- bestfit
- fitone_bestfit
format:
type: object
description: |
jpeg: None
png: None
properties:
.tag:
title: Choice of ThumbnailFormat
type: string
enum:
- jpeg
- png
title: Data
Output
type: object
description: |
entries: List of files and their thumbnails.
properties:
entries:
type: array
description: List of files and their thumbnails.
items:
type: object
description: |
success: None
failure: The result for this file if it was an error.
other: None
properties:
failure:
type: object
description: >
path: An error occurs when downloading metadata for the image.
unsupported_extension: The file extension doesn't allow conversion
to a thumbnail.
unsupported_image: The image cannot be converted to a thumbnail.
conversion_error: An error occurs during thumbnail conversion.
properties:
path:
type: object
description: >
malformed_path: None
not_found: There is nothing at the given path.
not_file: We were expecting a file, but the given path refers to
something that isn't a file.
not_folder: We were expecting a folder, but the given path
refers to something that isn't a folder.
restricted_content: The file cannot be transferred because the
content is restricted. For example, sometimes there are legal
restrictions due to copyright claims.
other: None
properties:
malformed_path:
type: string
.tag:
title: Choice of LookupError
type: string
enum:
- malformed_path
- not_found
- not_file
- not_folder
- restricted_content
- other
.tag:
title: Choice of ThumbnailError
type: string
enum:
- path
- unsupported_extension
- unsupported_image
- conversion_error
.tag:
title: Choice of GetThumbnailBatchResultEntry
type: string
enum:
- success
- failure
- other
success:
type: object
description: |
metadata: None
thumbnail: None
properties:
thumbnail:
type: string
metadata:
type: object
description: >
name: The last component of the path (including extension). This
never contains a slash.
id: A unique identifier for the file.
client_modified: For files, this is the modification time set by
the desktop client when the file was added to Dropbox. Since
this time is not verified (the Dropbox server stores whatever
the desktop client sends up), this should only be used for
display purposes (such as sorting) and not, for example, to
determine if a file has changed or not.
server_modified: The last time the file was modified on Dropbox.
rev: A unique identifier for the current revision of a file.
This field is the same rev as elsewhere in the API and can be
used to detect changes and avoid conflicts.
size: The file size in bytes.
path_lower: The lowercased full path in the user's Dropbox. This
always starts with a slash. This field will be null if the file
or folder is not mounted.
path_display: The cased path to be used for display purposes
only. In rare instances the casing will not correctly match the
user's filesystem, but this behavior will match the path
provided in the Core API v1, and at least the last path
component will have the correct casing. Changes to only the
casing of paths won't be returned by
:route:`list_folder/continue`. This field will be null if the
file or folder is not mounted.
parent_shared_folder_id: Please use
:field:`FileSharingInfo.parent_shared_folder_id` or
:field:`FolderSharingInfo.parent_shared_folder_id` instead.
media_info: Additional information if the file is a photo or
video.
symlink_info: Set if this file is a symlink.
sharing_info: Set if this file is contained in a shared folder.
property_groups: Additional information if the file has custom
properties with the property template specified.
has_explicit_shared_members: This flag will only be present if
include_has_explicit_shared_members is true in
:route:`list_folder` or :route:`get_metadata`. If this flag is
present, it will be true if this file has any explicit shared
members. This is different from sharing_info in that this could
be true in the case where a file has explicit members but is
not contained within a shared folder.
content_hash: A hash of the file content. This field can be used
to verify data integrity. For more information see our
:link:`Content hash /developers/reference/content-hash` page.
properties:
parent_shared_folder_id:
type: string
description: >-
Please use :field:`FileSharingInfo.parent_shared_folder_id`
or :field:`FolderSharingInfo.parent_shared_folder_id`
instead.
name:
type: string
description: >-
The last component of the path (including extension). This
never contains a slash.
property_groups:
type: array
description: >-
Additional information if the file has custom properties
with the property template specified.
items:
type: object
description: >
A subset of the property fields described by the
corresponding :type:`PropertyGroupTemplate`. Properties
are always added to a Dropbox file as a
:type:`PropertyGroup`. The possible key names and value
types in this group are defined by the corresponding
:type:`PropertyGroupTemplate`.
template_id: A unique identifier for the associated
template.
fields: The actual properties associated with the
template. There can be up to 32 property types per
template.
properties:
fields:
type: array
description: >-
The actual properties associated with the template.
There can be up to 32 property types per template.
items:
type: object
description: >
Raw key/value data to be associated with a Dropbox
file. Property fields are added to Dropbox files as
a :type:`PropertyGroup`.
name: Key of the property field associated with a
file and template. Keys can be up to 256 bytes.
value: Value of the property field associated with a
file and template. Values can be up to 1024 bytes.
properties:
name:
type: string
description: >-
Key of the property field associated with a file
and template. Keys can be up to 256 bytes.
value:
type: string
description: >-
Value of the property field associated with a
file and template. Values can be up to 1024
bytes.
template_id:
type: string
description: A unique identifier for the associated template.
rev:
type: string
description: >-
A unique identifier for the current revision of a file. This
field is the same rev as elsewhere in the API and can be
used to detect changes and avoid conflicts.
client_modified:
type: string
description: >-
For files, this is the modification time set by the desktop
client when the file was added to Dropbox. Since this time
is not verified (the Dropbox server stores whatever the
desktop client sends up), this should only be used for
display purposes (such as sorting) and not, for example, to
determine if a file has changed or not.
symlink_info:
type: object
description: |
target: The target this symlink points to.
properties:
target:
type: string
description: The target this symlink points to.
path_display:
type: string
description: >-
The cased path to be used for display purposes only. In rare
instances the casing will not correctly match the user's
filesystem, but this behavior will match the path provided
in the Core API v1, and at least the last path component
will have the correct casing. Changes to only the casing of
paths won't be returned by :route:`list_folder/continue`.
This field will be null if the file or folder is not
mounted.
has_explicit_shared_members:
type: boolean
description: >-
This flag will only be present if
include_has_explicit_shared_members is true in
:route:`list_folder` or :route:`get_metadata`. If this flag
is present, it will be true if this file has any explicit
shared members. This is different from sharing_info in that
this could be true in the case where a file has explicit
members but is not contained within a shared folder.
path_lower:
type: string
description: >-
The lowercased full path in the user's Dropbox. This always
starts with a slash. This field will be null if the file or
folder is not mounted.
server_modified:
type: string
description: The last time the file was modified on Dropbox.
sharing_info:
type: object
description: >
Sharing info for a file which is contained by a shared
folder.
read_only: True if the file or folder is inside a read-only
shared folder.
parent_shared_folder_id: ID of shared folder that holds this
file.
modified_by: The last user who modified the file. This field
will be null if the user's account has been deleted.
properties:
read_only:
type: boolean
description: >-
True if the file or folder is inside a read-only shared
folder.
parent_shared_folder_id:
type: string
description: ID of shared folder that holds this file.
modified_by:
type: string
description: >-
The last user who modified the file. This field will be
null if the user's account has been deleted.
media_info:
type: object
description: >
pending: Indicate the photo/video is still under processing
and metadata is not available yet.
metadata: The metadata for the photo/video.
properties:
.tag:
title: Choice of MediaInfo
type: string
enum:
- pending
- metadata
metadata:
type: object
description: |
Metadata for a photo or video.
dimensions: Dimension of the photo/video.
location: The GPS coordinate of the photo/video.
time_taken: The timestamp when the photo/video is taken.
properties:
dimensions:
type: object
description: |
Dimensions for a photo or video.
height: Height of the photo/video.
width: Width of the photo/video.
properties:
width:
type: number
description: Width of the photo/video.
height:
type: number
description: Height of the photo/video.
location:
type: object
description: |
GPS coordinates for a photo or video.
latitude: Latitude of the GPS coordinates.
longitude: Longitude of the GPS coordinates.
properties:
latitude:
type: number
description: Latitude of the GPS coordinates.
longitude:
type: number
description: Longitude of the GPS coordinates.
time_taken:
type: string
description: The timestamp when the photo/video is taken.
content_hash:
type: string
description: >-
A hash of the file content. This field can be used to verify
data integrity. For more information see our :link:`Content
hash /developers/reference/content-hash` page.
id:
type: string
description: A unique identifier for the file.
size:
type: number
description: The file size in bytes.