0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

Storage → Permanent Storage

AI-generated

Overview

The node provides a set of permanent file storage operations within the "Storage" resource. It allows users to store files permanently, retrieve them either as raw data or URLs, delete files, and list all stored files. This is useful in scenarios where workflows need to manage files persistently, such as saving generated reports, images, or documents for later use or sharing.

Practical examples:

  • Uploading a generated PDF report and storing it permanently for future retrieval.
  • Fetching a stored image file as a URL to embed in emails or web pages.
  • Deleting outdated or unnecessary files from permanent storage.
  • Listing all stored files to display available resources or manage storage.

Properties

Name Meaning
Operation Type The action to perform on permanent storage. Options: Store File, Get File, Delete File, List Files
File Data (For Store File) The binary file content encoded in base64 format
File Name (For Store File) The name of the file including extension to preserve file type
File ID (For Get File and Delete File) The unique identifier of the file to retrieve or delete
Get File as URL (For Get File) Boolean flag indicating whether to get the file as a direct URL or raw data

Output

The node outputs JSON data representing the result of the selected operation:

  • Store File: Likely returns metadata about the stored file, such as its ID or confirmation of successful upload.
  • Get File: Returns the file content either as raw binary data (base64) or as a URL depending on the Get File as URL flag.
  • Delete File: Returns confirmation of deletion or status message.
  • List Files: Returns an array of stored files with their metadata including file IDs, names, and possibly other attributes.

If the file is retrieved as binary data, it will be base64 encoded in the output JSON. If retrieved as a URL, the output will contain the accessible link to the file.

Dependencies

  • Requires an API key credential for authentication to the external 0CodeKit service.
  • The node sends HTTP POST requests to endpoints under /storage/perm/{operation} on the base URL https://prod.0codekit.com.
  • No additional environment variables are explicitly required beyond the API key credential.

Troubleshooting

  • Common issues:

    • Incorrect or missing API key credential will cause authentication failures.
    • Providing an invalid or non-existent File ID when getting or deleting files will result in errors.
    • Omitting the file extension in the filename during upload may cause issues with file type recognition.
    • Requesting a file as URL when the file is not accessible publicly might fail.
  • Error messages:

    • Authentication errors: Check that the API key credential is correctly configured.
    • File not found: Verify the File ID used exists by listing files first.
    • Invalid input data: Ensure base64 encoding of file data is correct and filename includes extension.

Links and References

Discussion