Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

File → Import File

AI-generated

Overview

This node operation imports a file into the system by downloading it from a specified URL. It is useful for automating the process of fetching and storing files from external sources directly into the platform. For example, it can be used to import images, documents, or any file type from a web URL into a file management system.

Use Case Examples

  1. Importing an image file from a public URL to a content management system.
  2. Automatically downloading and storing a PDF report from a remote server.

Properties

Name Meaning
URL The URL to download the file from, which is required to fetch the file.
Additional Fields Optional additional properties of the file object in JSON format to customize the imported file's metadata.

Output

JSON

  • file - The imported file object with its properties as returned by the system after import.

Dependencies

  • Requires an API key credential or authentication token to access the file import API endpoint.

Troubleshooting

  • Ensure the URL is accessible and publicly reachable; otherwise, the download will fail.
  • Validate the JSON format of the additional file object properties to avoid parsing errors.
  • Check for proper authentication credentials to avoid authorization errors during file import.

Links

Discussion