🚀 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
@v2consistently - 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.html→builds/{sha}/index.htmldist/assets/style.css→builds/{sha}/assets/style.cssdist/assets/script.js→builds/{sha}/assets/script.jsdist/images/logo.png→builds/{sha}/images/logo.png
🔄 Backward Compatibility
- ✅ No Breaking Changes: Existing single file workflows continue to work unchanged
- ✅ Same Inputs:
source,destination, andread-write-tokenremain 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.joinfor 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.