# Download a file
curl -O -J https://app.drime.cloud/api/v1/file-entries/download/MzI2MHxwYWRkaQ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# -O: Save with original filename
# -J: Use filename from Content-Disposition header
const hash = 'MzI2MHxwYWRkaQ';
const response = await fetch(
`https://app.drime.cloud/api/v1/file-entries/download/${hash}`,
{
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
}
);
// Get filename from Content-Disposition header
const disposition = response.headers.get('Content-Disposition');
const filename = disposition?.match(/filename="(.+)"/)?.[1] || 'download';
// Download the file
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = filename;
a.click();
URL.revokeObjectURL(url);
import requests
hash = 'MzI2MHxwYWRkaQ'
response = requests.get(
f'https://app.drime.cloud/api/v1/file-entries/download/{hash}',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
stream=True
)
# Get filename from Content-Disposition header
content_disposition = response.headers.get('Content-Disposition', '')
filename = content_disposition.split('filename="')[1].rstrip('"') if 'filename=' in content_disposition else 'download'
# Save file
with open(filename, 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print(f'Downloaded: {filename}')
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Disposition: attachment; filename="photo.jpg"
Content-Length: 2048576
[binary file content]
Files & Folders
Download File
Download a file or folder
GET
/
file-entries
/
download
/
{hash}
# Download a file
curl -O -J https://app.drime.cloud/api/v1/file-entries/download/MzI2MHxwYWRkaQ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# -O: Save with original filename
# -J: Use filename from Content-Disposition header
const hash = 'MzI2MHxwYWRkaQ';
const response = await fetch(
`https://app.drime.cloud/api/v1/file-entries/download/${hash}`,
{
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
}
);
// Get filename from Content-Disposition header
const disposition = response.headers.get('Content-Disposition');
const filename = disposition?.match(/filename="(.+)"/)?.[1] || 'download';
// Download the file
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = filename;
a.click();
URL.revokeObjectURL(url);
import requests
hash = 'MzI2MHxwYWRkaQ'
response = requests.get(
f'https://app.drime.cloud/api/v1/file-entries/download/{hash}',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
stream=True
)
# Get filename from Content-Disposition header
content_disposition = response.headers.get('Content-Disposition', '')
filename = content_disposition.split('filename="')[1].rstrip('"') if 'filename=' in content_disposition else 'download'
# Save file
with open(filename, 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print(f'Downloaded: {filename}')
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Disposition: attachment; filename="photo.jpg"
Content-Length: 2048576
[binary file content]
Overview
Downloads a file by its hash. For folders, the contents are automatically zipped.Path Parameters
string
required
The file entry hash (e.g.,
MzI2MHxwYWRkaQ)Response
Returns the file content with appropriateContent-Type and Content-Disposition headers.
- For single files: The file is downloaded directly
- For folders: A ZIP archive is created and downloaded
# Download a file
curl -O -J https://app.drime.cloud/api/v1/file-entries/download/MzI2MHxwYWRkaQ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# -O: Save with original filename
# -J: Use filename from Content-Disposition header
const hash = 'MzI2MHxwYWRkaQ';
const response = await fetch(
`https://app.drime.cloud/api/v1/file-entries/download/${hash}`,
{
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
}
);
// Get filename from Content-Disposition header
const disposition = response.headers.get('Content-Disposition');
const filename = disposition?.match(/filename="(.+)"/)?.[1] || 'download';
// Download the file
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = filename;
a.click();
URL.revokeObjectURL(url);
import requests
hash = 'MzI2MHxwYWRkaQ'
response = requests.get(
f'https://app.drime.cloud/api/v1/file-entries/download/{hash}',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
stream=True
)
# Get filename from Content-Disposition header
content_disposition = response.headers.get('Content-Disposition', '')
filename = content_disposition.split('filename="')[1].rstrip('"') if 'filename=' in content_disposition else 'download'
# Save file
with open(filename, 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print(f'Downloaded: {filename}')
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Disposition: attachment; filename="photo.jpg"
Content-Length: 2048576
[binary file content]
For folders, the response will have
Content-Type: application/zip and the filename will end with .zip.⌘I

