You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add folder upload support with improved code structure (#4)
* feat: enhance Vercel Blob Action to support folder uploads and improve documentation
- Updated action.yml to clarify input descriptions for file and folder uploads.
- Modified README to reflect the ability to upload entire folders, including detailed usage examples.
- Refactored index.ts to implement recursive file retrieval for folder uploads, enhancing functionality.
- Improved error handling to differentiate between file and directory uploads, providing clearer error messages.
* feat: add GitHub Actions workflow for testing file and folder uploads to Vercel Blob
- Introduced a new workflow in test-upload.yml to automate testing of single file and folder uploads to Vercel Blob.
- The workflow includes steps for creating test files and folders, uploading them, and summarizing the test results.
- Implemented cleanup steps to remove test artifacts after execution.
Copy file name to clipboardExpand all lines: README.md
+37-23Lines changed: 37 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,30 @@
1
1
# Upload to Vercel Blob
2
2
3
-
This GitHub Action allows you to upload files to Vercel Blob storage by specifying a source file and destination path. It provides an easy way to manage blob storage in your Vercel projects through GitHub Actions workflows.
3
+
This GitHub Action allows you to upload files or entire folders to Vercel Blob storage by specifying a source path and destination path. It provides an easy way to manage blob storage in your Vercel projects through GitHub Actions workflows.
4
4
5
5
## Inputs
6
6
7
7
### `source`
8
8
9
-
**Required** The source path of the file you want to upload to Vercel Blob storage.
9
+
**Required** The source path of the file or folder you want to upload to Vercel Blob storage.
10
+
11
+
-**File**: Upload a single file
12
+
-**Folder**: Upload all files within the folder (including subdirectories)
10
13
11
14
### `destination`
12
15
13
-
**Required** The destination path where the file should be stored in Vercel Blob storage.
16
+
**Required** The destination path where the file(s) should be stored in Vercel Blob storage.
17
+
18
+
-**For files**: The exact destination path for the file
19
+
-**For folders**: The base path where all files will be uploaded (maintaining folder structure)
14
20
15
21
### `read-write-token`
16
22
17
23
**Required** Your Vercel Blob read-write token (`BLOB_READ_WRITE_TOKEN`). This should be stored as a GitHub secret for security.
18
24
19
25
## Outputs
20
26
21
-
### `url`
22
-
23
-
The URL of the uploaded blob file.
27
+
This action does not provide any outputs for privacy and security reasons. To access your uploaded files, check your Vercel dashboard under Storage → Blob.
24
28
25
29
## Environment Variables
26
30
@@ -33,34 +37,38 @@ This action requires a Vercel Blob read-write token. The action will automatical
33
37
34
38
## Usage
35
39
36
-
To use this action in your workflow, add it as a step in your GitHub Actions workflow file:
0 commit comments