Lark Files icon

Lark Files

Lark Files Management

Overview

This node facilitates multipart upload of media files to a document or file management system, specifically supporting the operation "Upload A Material In Blocks Preuploading." It is designed to handle large files by uploading them in blocks (chunks), which can improve reliability and efficiency when dealing with big media assets.

Common scenarios include:

  • Uploading large video, audio, or image files that exceed single-request size limits.
  • Preparing files for further processing or sharing within an enterprise collaboration platform.
  • Incrementally uploading data to avoid timeouts or network interruptions.

Practical example:

  • A user wants to upload a large training video to a shared company drive. Instead of uploading the entire file at once, this node splits the file into blocks and uploads each block sequentially, ensuring the upload can resume if interrupted.

Properties

Name Meaning
Authentication Method of authentication to use: either "Tenant Token" or "OAuth2".
Extra Additional metadata or parameters sent along with the upload request as a string.
File Name The name of the file being uploaded.
Parent Node Identifier of the parent folder or node where the file will be stored.
Parent Type Type/category of the parent container (e.g., folder, project).
Size Total size of the file in bytes.
Use Custom Body Boolean flag indicating whether to send a custom JSON body instead of individual fields.
Custom Body JSON object representing a fully customized request body, overriding default fields.

Output

The node outputs JSON data containing the response from the multipart pre-upload API call. This typically includes information such as:

  • Upload session identifiers or tokens.
  • URLs or endpoints for uploading individual blocks.
  • Status or confirmation of the pre-upload initialization.

If binary data is involved, it would represent the media content being uploaded in chunks, but this node primarily handles metadata and control flow for the multipart upload process rather than raw binary output.

Dependencies

  • Requires an API authentication token, either via a tenant token credential or OAuth2.
  • Connects to the external Lark Suite open API endpoint (https://open.larksuite.com/open-apis).
  • No additional environment variables are explicitly required beyond standard n8n credential setup.

Troubleshooting

  • Authentication errors: Ensure the correct authentication method is selected and valid credentials are provided.
  • Invalid parent node/type: Verify that the specified parent node and type exist and are accessible with the given credentials.
  • File size mismatch: Confirm that the 'Size' property accurately reflects the total file size; discrepancies may cause upload failures.
  • Custom body issues: When using a custom body, ensure the JSON structure matches the API expectations exactly to avoid malformed requests.
  • Network or timeout errors: Multipart uploads mitigate these, but persistent issues may require checking network stability or API rate limits.

Links and References

Discussion