File Storage
Secure file upload, download, and management with presigned URLs and blob storage integration.
File Storage
File management capabilities for workflows requiring document processing, file transfers, and content storage. Provides secure file operations through presigned URLs, blob storage integration, and file handling methods.
Quick Navigation
File Operations
Learn upload, download, and content management methods
Security & URLs
Understand presigned URLs and secure file access patterns
Integration Patterns
Combine with other nodes for complete file workflows
Best Practices
File size limits, performance tips, and security guidelines
Methods
GetUploadRequest
Generate presigned upload URL for client-side file uploads.
Inputs
| Name | Code | Type | Required | Description |
|---|---|---|---|---|
| Filename | filename | Text | ✅ Yes | File name with extension |
| Object Key | objectKey | Text | ✅ Yes | Unique file identifier for storage |
Outputs
| Name | Type | Description |
|---|---|---|
| request | Object | Presigned upload request with URL and form fields |
| url | Text | Direct upload URL |
| objectKey | Text | Storage object identifier |
Configuration Example
{
"filename": "document.pdf",
"objectKey": "uploads/{{timestamp}}/{{filename}}"
}Security Advantages
- Temporary access with expiration time
- Direct browser uploads without server intermediation
- Size and type validation at storage layer
- Audit trail for all upload operations
File Size Limitations
- Upload size depends on infrastructure configuration
- No explicit limit enforced at application level
GetDownloadRequest
Generate presigned download URL for secure file access.
Inputs
| Name | Code | Type | Required | Description |
|---|---|---|---|---|
| Blob ID | blobId | Text | ✅ Yes | Blob storage identifier |
Alternative input:
| Name | Code | Type | Required | Description |
|---|---|---|---|---|
| Object Key | objectKey | Text | ✅ Yes | Unique file identifier |
Outputs
| Name | Type | Description |
|---|---|---|
| request | Object | Presigned download request with URL and expiration |
| url | Text | Direct download URL |
| expiresAt | Text | URL expiration timestamp |
Configuration Example
{
"blobId": "{{fileBlobId}}"
}Workflow Example
// Use system-generated download link for sharing
var downloadRequest = ctx.nodes.fileStorage.outputs.request;
var secureLink = downloadRequest.url;
var expiration = downloadRequest.expiresAt;
// Forward the automatically generated link
return {
downloadLink: secureLink,
expiresAt: expiration,
accessGranted: true
};File Size Limitations
- Download size limited to 10MB maximum
- Enforced by backend HTTP response size configuration
GetContent
Retrieve file content directly into workflow context.
Inputs
| Name | Code | Type | Required | Description |
|---|---|---|---|---|
| Blob ID | blobId | Text | ✅ Yes | Blob storage identifier |
Outputs
| Name | Type | Description |
|---|---|---|
| content | Text | File content as string |
| metadata | Object | File metadata (size, type, etc.) |
| contentType | Text | MIME type of the file |
Configuration Example
{
"blobId": "{{targetBlobId}}"
}Workflow Example
// Process different file types
var fileContent = ctx.nodes.fileStorage.outputs.content;
var fileMetadata = ctx.nodes.fileStorage.outputs.metadata;
if (fileMetadata.contentType === 'application/json') {
var jsonData = JSON.parse(fileContent);
return { parsedData: jsonData };
} else if (fileMetadata.contentType === 'text/csv') {
var csvLines = fileContent.split('\n');
return { rowCount: csvLines.length };
}
return { contentLength: fileContent.length };File Size Limitations
- Content output limited to 1MB maximum
- Enforced by node output size configuration
- Large files should use GetDownloadRequest instead
PutContent
Store content directly from workflow variables.
Inputs
| Name | Code | Type | Required | Description |
|---|---|---|---|---|
| Content | content | Text | ✅ Yes | File content for upload |
| Filename | filename | Text | ✅ Yes | File name with extension |
| Base64 Encoded | base64Encoded | Boolean | No | Content encoding flag (default: false) |
Outputs
| Name | Type | Description |
|---|---|---|
| url | Text | Public URL of stored file |
| blobId | Text | Blob storage identifier |
| success | Boolean | Upload success status |
Configuration Example
{
"filename": "data.json",
"content": "{{fileContent}}",
"base64Encoded": false
}Workflow Example
// Prepare file for upload
var fileData = ctx.vars.documentData;
var fileName = ctx.vars.fileName || 'upload_' + Date.now() + '.pdf';
// Encode content if needed
var base64Content = base64encode(fileData);
return {
fileContent: base64Content,
fileName: fileName,
uploadReady: true
};File Size Limitations
- Upload size depends on infrastructure configuration
- Content is processed in memory, consider size for performance
SaveLink
Download and store files from external URLs.
Inputs
| Name | Code | Type | Required | Description |
|---|---|---|---|---|
| Source URL | sourceUrl | Text | ✅ Yes | External URL to download from |
| Filename | filename | Text | ✅ Yes | File name for stored file |
Outputs
| Name | Type | Description |
|---|---|---|
| url | Text | Public URL of stored file |
| blobId | Text | Blob storage identifier |
| success | Boolean | Download and storage success status |
Configuration Example
{
"sourceUrl": "{{externalFileUrl}}",
"filename": "downloaded_{{timestamp}}.pdf"
}Workflow Example
// Validate external URL
var externalUrl = ctx.vars.documentUrl;
var timestamp = new Date().toISOString().replace(/[:.]/g, '-');
if (!externalUrl || !externalUrl.startsWith('https://')) {
return { error: 'Invalid or insecure URL provided' };
}
return {
externalFileUrl: externalUrl,
timestamp: timestamp,
validated: true
};File Size Limitations
- External file download limited to 10MB maximum
- Same limit as backend HTTP response size configuration
- Larger external files will fail to download
Architecture & Data Flow
File Storage Architecture
Security Model
Security Architecture
File Storage implements multiple security layers:
- Temporary links with automatic expiration
- User permission validation before file access
- Content validation for uploaded files
- Audit logging for all file operations
Secure File Links
Temporary File Links
The system automatically creates secure, temporary links for file access without exposing storage credentials.
System-Generated Benefits:
- Automatic expiration - System creates URLs that expire after 1 hour
- Direct file operations - Generated links allow direct browser upload/download
- Secure by design - System handles all credential management
- Workflow ready - Links are automatically provided in node outputs
Security Best Practices
Integration Patterns
Document Processing Workflows
Integration Pattern
File Storage serves as a hub in document processing pipelines.
API Integration Patterns
Best Practices
Best Practices
- Validate file types and sizes before storage operations
- Use secure file links for external file sharing and large uploads
- Implement error handling for network and storage failures
- Monitor storage usage and implement cleanup policies
- Secure file access with user permissions and time-limited URLs
- Log file operations for audit and debugging purposes
Performance & Limitations
Storage Limitations
- Download file size: 10MB maximum per file
- GetContent output size: 1MB maximum (node output limitation)
- Concurrent uploads: 10 simultaneous operations per workflow
- Secure link expiration: 1 hour default (configurable)
- Storage retention: 30 days for temporary files
- Upload file size: Depends on infrastructure configuration
Configuration-Dependent Limits
File size limitations are configured at the backend level and may vary between deployments. The limits shown above are default values that can be adjusted by system administrators.
Security Guidelines
| Security Aspect | Recommendation | Implementation |
|---|---|---|
| File Validation | Always validate file types and sizes | Pre-upload validation in JavaScript nodes |
| Access Control | Use role-based file permissions | Check ctx.user.roles before file operations |
| Link Security | Prefer secure file links over direct access | Use GetDownloadRequest for sharing |
| Content Scanning | Scan uploads for malicious content | Implement virus scanning in processing nodes |
| Audit Logging | Log all file operations with user context | Use console.log with user and file details |
Error Handling Patterns
// Comprehensive error handling for file operations
function handleFileStorageError(error, operation) {
var errorInfo = {
operation: operation,
error: error.message || 'Unknown error',
timestamp: new Date().toISOString(),
user: ctx.user.login,
retryable: false
};
// Determine if error is retryable
if (error.includes('network') || error.includes('timeout')) {
errorInfo.retryable = true;
}
console.error('File storage error:', errorInfo);
return errorInfo;
}
// Usage in workflow
var fileResult = ctx.nodes.fileStorage.outputs;
if (!fileResult.url) {
var errorInfo = handleFileStorageError(
ctx.nodes.fileStorage.error,
'file_upload'
);
return { error: errorInfo };
}
// Success path
return { fileUrl: fileResult.url };Troubleshooting
Common Issues
| Problem | Symptoms | Solution |
|---|---|---|
| Upload fails | No URL returned, error in logs | Check file size, type, and network connectivity |
| Secure link expired | 403 Forbidden on link access | Generate new secure link |
| File not found | 404 error on download | Verify blob ID and file existence |
| Permission denied | 403 Unauthorized | Check user permissions and access policies |
| Content encoding errors | Corrupted file content | Verify base64Encoded flag matches content format |
Related Nodes
Data Converter
Process XML files stored in File Storage
Transaction
Manage atomic operations involving multiple files
JavaScript Execution
Process file content with custom logic using getFileContent()
API Integration
Upload files to and download from external APIs
Next: Learn about Transaction Management for atomic file operations, or explore Data Converter for processing stored XML files.