|
4 | 4 | - [Update file](#update-file)
|
5 | 5 | - [Delete file](#delete-file)
|
6 | 6 | - [Copy file](#copy-file)
|
| 7 | +- [Get file thumbnail URL](#get-file-thumbnail-url) |
7 | 8 | - [Get file thumbnail](#get-file-thumbnail)
|
8 | 9 |
|
9 | 10 | ## Get file information
|
@@ -147,6 +148,47 @@ Not all available fields are returned by default. Use the
|
147 | 148 | [fields](#param-fields) query parameter to explicitly request
|
148 | 149 | any specific fields.
|
149 | 150 |
|
| 151 | +## Get file thumbnail URL |
| 152 | + |
| 153 | +Get the download URL without downloading the content. |
| 154 | + |
| 155 | +This operation is performed by calling function `getFileThumbnailUrl`. |
| 156 | + |
| 157 | +See the endpoint docs at |
| 158 | +[API Reference](https://developer.box.com/reference/get-files-id-thumbnail-id/). |
| 159 | + |
| 160 | +<!-- sample get_files_id_thumbnail_id --> |
| 161 | + |
| 162 | +```ts |
| 163 | +await client.files.getFileThumbnailUrl( |
| 164 | + thumbnailFile.id, |
| 165 | + 'png' as GetFileThumbnailUrlExtension, |
| 166 | +); |
| 167 | +``` |
| 168 | + |
| 169 | +### Arguments |
| 170 | + |
| 171 | +- fileId `string` |
| 172 | + - The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345" |
| 173 | +- extension `GetFileThumbnailUrlExtension` |
| 174 | + - The file format for the thumbnail Example: "png" |
| 175 | +- optionalsInput `GetFileThumbnailUrlOptionalsInput` |
| 176 | + - |
| 177 | + |
| 178 | +### Returns |
| 179 | + |
| 180 | +This function returns a value of type `string`. |
| 181 | + |
| 182 | +When a thumbnail can be created the thumbnail data will be |
| 183 | +returned in the body of the response.Sometimes generating a thumbnail can take a few seconds. In these |
| 184 | +situations the API returns a `Location`-header pointing to a |
| 185 | +placeholder graphic for this file type. |
| 186 | + |
| 187 | +The placeholder graphic can be used in a user interface until the |
| 188 | +thumbnail generation has completed. The `Retry-After`-header indicates |
| 189 | +when to the thumbnail will be ready. At that time, retry this endpoint |
| 190 | +to retrieve the thumbnail. |
| 191 | + |
150 | 192 | ## Get file thumbnail
|
151 | 193 |
|
152 | 194 | Retrieves a thumbnail, or smaller image representation, of a file.
|
|
0 commit comments