DownloadFile
Download a file. Requires files or files.ui_hidden.read as a scope.
Input
Name | Type | Accepts Output Streams | Description |
FileId | String | False | ID of file. |
Size | String | False | For image files. This will resize the image to the desired size before sharing. Does not affect the original file, just the file served by this signed URL.
The allowed values are thumb, icon, medium, preview. |
Upscale | Boolean | False | If size is provided, this will upscale the image to fit the size dimensions.
The default value is false. |
ExpirationSeconds | Long | False | How long in seconds the link will provide access to the file. |
LocalPath | String | False | The local file path for the location where the file will be saved on disk. |
FileStream | String | True | An instance of an output stream where file data is written to. Only used if LocalPath is not set. |
Result Set Columns
Name | Type | Description |
Success | String | Whether or not the stored procedure was successful. |
Details | String | Any extra details on the stored procedure's execution. |
Url | String | Signed URL with access to the specified file. Anyone with this URL will be able to access the file until it expires. |
ExpiresAt | String | Timestamp of when the URL will no longer grant access to the file. |
Name | String | Name of the requested file. |
Extension | String | Extension of the requested file. |
Type | String | Type of the file. Can be IMG, DOCUMENT, AUDIO, MOVIE, or OTHER. |
Size | String | Size in bytes of the requested file. |
Height | String | For image and video files. The height of the file. |
Width | String | For image and video files. The width of the file. |
FileData | String | File data that will be outputted encoded in BASE64 if the LocalPath and FileStream inputs are empty. |