Skip to content

v2.1.0 - Folder Upload Support

Latest

Choose a tag to compare

@dartilesm dartilesm released this 25 May 15:16
· 4 commits to master since this release
6e2358f

🚀 New Feature: Folder Upload Support

This release adds comprehensive folder upload functionality, allowing you to upload entire directories while maintaining their structure in Vercel Blob storage.

✨ New Features

  • 📁 Folder Upload: Upload entire directories with recursive file discovery
  • 🏗️ Structure Preservation: Maintains original folder hierarchy in blob storage
  • 🔄 Nested Directory Support: Handles subdirectories and complex folder structures
  • 📊 Progress Logging: Clear visibility into upload progress for each file

🛠 Code Quality Improvements

  • Better Readability: Improved code structure and maintainability
  • Enhanced Documentation: Comprehensive TypeScript documentation and comments
  • Error Handling: Improved validation and error messages

📚 Documentation Updates

  • Unified Examples: Combined Usage and Examples sections for better clarity
  • Consistent Versioning: All examples now use @v2 consistently
  • Updated Descriptions: Improved action.yml and README descriptions
  • Privacy Focus: Corrected outputs documentation (no URL exposure)

🎯 Usage Examples

Single File Upload:

- name: Upload file to Vercel Blob
  uses: dartilesm/vercel-blob-action@v2
  with:
    source: "file.txt"
    destination: "uploads/file.txt"
    read-write-token: ${{ secrets.BLOB_READ_WRITE_TOKEN }}

Folder Upload:

- name: Upload build folder to Vercel Blob
  uses: dartilesm/vercel-blob-action@v2
  with:
    source: "dist/"
    destination: "builds/${{ github.sha }}"
    read-write-token: ${{ secrets.BLOB_READ_WRITE_TOKEN }}

📦 What Gets Uploaded

When uploading a folder like dist/ with this structure:

dist/
├── index.html
├── assets/
│   ├── style.css
│   └── script.js
└── images/
    └── logo.png

Files are uploaded maintaining the structure:

  • dist/index.htmlbuilds/{sha}/index.html
  • dist/assets/style.cssbuilds/{sha}/assets/style.css
  • dist/assets/script.jsbuilds/{sha}/assets/script.js
  • dist/images/logo.pngbuilds/{sha}/images/logo.png

🔄 Backward Compatibility

  • ✅ No Breaking Changes: Existing single file workflows continue to work unchanged
  • ✅ Same Inputs: source, destination, and read-write-token remain the same
  • ✅ Same Behavior: Single file uploads work exactly as before

🏗️ Technical Details

  • Memory Efficient: Files are streamed individually for optimal performance
  • Cross-Platform: Uses path.posix.join for consistent blob paths
  • Recursive Discovery: Automatically finds all files in directories and subdirectories
  • Public Access: All uploaded files have public access by default

This release makes the action significantly more versatile for real-world deployment scenarios while maintaining full backward compatibility.