ByteChef LogoByteChef
Components

File Storage

Reads and writes data from a file stored inside the file storage.

Reads and writes data from a file stored inside the file storage.

Categories: File Storage, Helpers

Type: fileStorage/v1


Actions

Read from File as String

Name: read

Reads data from the file as string.

Properties

NameLabelTypeDescriptionRequired
fileEntryFileFILE_ENTRYThe object property which contains a reference to the file to read from.true

Example JSON Structure

{
  "label" : "Read from File as String",
  "name" : "read",
  "parameters" : {
    "fileEntry" : {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    }
  },
  "type" : "fileStorage/v1/read"
}

Output

Sample Output:

Sample content

Type: STRING

Write to File

Name: write

Writes the data to the file.

Properties

NameLabelTypeDescriptionRequired
contentContentSTRINGString to write to the file.true
filenameFilenameSTRINGFilename to set for data. By default, "file.txt" will be used.null

Example JSON Structure

{
  "label" : "Write to File",
  "name" : "write",
  "parameters" : {
    "content" : "",
    "filename" : ""
  },
  "type" : "fileStorage/v1/write"
}

Output

Type: FILE_ENTRY

Properties

NameTypeDescription
extensionSTRING
mimeTypeSTRING
nameSTRING
urlSTRING

Output Example

{
  "extension" : "",
  "mimeType" : "",
  "name" : "",
  "url" : ""
}

Download File

Name: download

Download a file from the URL.

Properties

NameLabelTypeDescriptionRequired
urlURLSTRINGThe URL to download a file from.true
filenameFilenameSTRINGFilename to set for data. By default, "file.txt" will be used.null

Example JSON Structure

{
  "label" : "Download File",
  "name" : "download",
  "parameters" : {
    "url" : "",
    "filename" : ""
  },
  "type" : "fileStorage/v1/download"
}

Output

Type: FILE_ENTRY

Properties

NameTypeDescription
extensionSTRING
mimeTypeSTRING
nameSTRING
urlSTRING

Output Example

{
  "extension" : "",
  "mimeType" : "",
  "name" : "",
  "url" : ""
}

On this page