Dify File icon

Dify File

Upload and manage files in Dify AI platform for use in conversations and workflows

Actions3

File → Get Info

AI-generated

Overview

The node "Dify File" allows users to upload and manage files on the Dify AI platform, enabling integration of file operations within n8n workflows. Specifically, for the File - Get Info operation, it retrieves information about a specified file uploaded by a user. This is useful in scenarios where you need metadata or details about files stored in the Dify platform, such as verifying file existence, checking file size, or obtaining upload-related metadata before further processing.

Practical examples include:

  • Fetching file details to display in a dashboard.
  • Validating file properties before triggering downstream automation.
  • Retrieving detailed metadata for audit or logging purposes.

Properties

Name Meaning
File ID The unique identifier of the file to get information about (e.g., file-123abc).
User Identifier of the user who uploaded the file (e.g., user123).
Additional Options Collection of optional parameters:
- Timeout (Seconds) Maximum time (5 to 300 seconds) to wait for the file operation to complete (default 60 seconds).
- Output Format Format of the returned file information. Options:
- Standard: Return standard file info like name, size, type.
- Detailed: Return detailed info including upload metadata.
- Compact: Return only essential file information.

Output

The output JSON contains the file information retrieved from the Dify platform according to the selected output format:

  • Standard: Typical file metadata such as file name, size, MIME type, and basic attributes.
  • Detailed: Extended metadata including upload timestamps, uploader info, and possibly versioning or other enriched data.
  • Compact: Minimal essential information, likely just identifiers and key attributes.

No binary data is returned for the "Get Info" operation.

Dependencies

  • Requires an API key credential for authenticating with the Dify AI platform.
  • The node uses the base URL and authorization token configured in the credentials.
  • No additional external dependencies beyond the Dify API are needed.

Troubleshooting

  • Common issues:

    • Invalid or missing File ID or User identifier will cause errors.
    • Network timeouts if the file operation takes longer than the specified timeout.
    • Unauthorized errors if the API key is invalid or lacks permissions.
  • Error messages:

    • "The operation "getInfo" is not supported for resource "file": Indicates a misconfiguration of operation or resource.
    • API errors related to authentication or file not found will be surfaced in the error message.
  • Resolutions:

    • Verify that the File ID and User fields are correctly set.
    • Ensure the API key credential is valid and has access rights.
    • Adjust the timeout option if operations take longer than expected.

Links and References

Discussion