Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Storage → Download File

AI-generated

Overview

This node interacts with the Appwrite API to perform various operations on storage resources, specifically enabling the download of files from a specified storage bucket. It is useful in scenarios where users need to programmatically retrieve files stored in Appwrite's storage service, such as downloading user-uploaded documents, images, or backups for further processing or storage elsewhere.

Use Case Examples

  1. Downloading a user profile image stored in a specific bucket to use in a workflow.
  2. Retrieving a document file from a storage bucket for processing or analysis.
  3. Automating backup retrieval by downloading files from cloud storage buckets.

Properties

Name Meaning
Bucket ID The ID of the storage bucket from which the file will be downloaded.
File ID The ID of the file to be downloaded from the specified bucket.
Put Output in Field The name of the output binary field where the downloaded file data will be stored.

Output

Binary

Contains the downloaded file data stored in the specified binary property field (default is 'data').

JSON

  • fileId - The ID of the downloaded file.
  • bucketId - The ID of the storage bucket from which the file was downloaded.
  • fileName - The name of the downloaded file.
  • mimeType - The MIME type of the downloaded file.
  • sizeOriginal - The original size of the downloaded file in bytes.

Dependencies

  • Appwrite API key credential for authentication

Troubleshooting

  • Ensure the provided Bucket ID and File ID are correct and exist in the Appwrite storage service to avoid 'file not found' errors.
  • Verify that the API key credential has sufficient permissions to access the storage bucket and download files.
  • If the file download fails, check network connectivity and Appwrite service availability.
  • Common error messages include authentication failures due to invalid API keys, permission denied errors, and file not found errors. Resolving these involves verifying credentials, permissions, and resource identifiers.

Links

Discussion