vercel blob
The vercel blob
command is used to interact with Vercel Blob storage, providing functionality to upload, list, delete, and copy files, as well as manage Blob stores.
For more information about Vercel Blob, see the Vercel Blob documentation and Vercel Blob SDK reference.
The vercel blob
command supports the following operations:
list
- List all files in the Blob storeput
- Upload a file to the Blob storedel
- Delete a file from the Blob storecopy
- Copy a file in the Blob storestore add
- Add a new Blob storestore remove
- Remove a Blob storestore get
- Get a Blob store
vercel blob list
Using the vercel blob list
command to list all files
in the Blob store.
vercel blob put [path-to-file]
Using the vercel blob put
command to upload a file to
the Blob store.
vercel blob del [url-or-pathname]
Using the vercel blob del
command to delete a file
from the Blob store.
vercel blob copy [from-url-or-pathname] [to-pathname]
Using the vercel blob copy
command to copy a file in
the Blob store.
vercel blob store add [name]
Using the vercel blob store add
command to add a new
Blob store.
vercel blob store remove [store-id]
Using the vercel blob store remove
command to remove
a Blob store.
vercel blob store get [store-id]
Using the vercel blob store get
command to get a Blob
store.
These are options that only apply to the vercel blob
command.
You can use the --limit
option to specify the number of results to return per page when using list
. The default value is 10
and the maximum is 1000
.
vercel blob list --limit 100
Using the vercel blob list
command with the
--limit
option.
You can use the --cursor
option to specify the cursor from a previous page to start listing from.
vercel blob list --cursor [cursor-value]
Using the vercel blob list
command with the
--cursor
option.
You can use the --prefix
option to filter Blobs by a specific prefix.
vercel blob list --prefix images/
Using the vercel blob list
command with the
--prefix
option.
You can use the --mode
option to filter Blobs by either folded or expanded mode. The default is expanded
.
vercel blob list --mode folded
Using the vercel blob list
command with the
--mode
option.
You can use the --add-random-suffix
option to add a random suffix to the file name when using put
or copy
.
vercel blob put image.jpg --add-random-suffix
Using the vercel blob put
command with the
--add-random-suffix
option.
You can use the --pathname
option to specify the pathname to upload the file to. The default is the filename.
vercel blob put image.jpg --pathname assets/images/hero.jpg
Using the vercel blob put
command with the
--pathname
option.
You can use the --content-type
option to overwrite the content-type when using put
or copy
. It will be inferred from the file extension if not provided.
vercel blob put data.txt --content-type application/json
Using the vercel blob put
command with the
--content-type
option.
You can use the --cache-control-max-age
option to set the max-age
of the cache-control header directive when using put
or copy
. The default is 2592000
(30 days).
vercel blob put image.jpg --cache-control-max-age 86400
Using the vercel blob put
command with the
--cache-control-max-age
option.
You can use the --force
option to overwrite the file if it already exists when uploading. The default is false
.
vercel blob put image.jpg --force
Using the vercel blob put
command with the
--force
option.
You can use the --multipart
option to upload the file in multiple small chunks for performance and reliability. The default is true
.
vercel blob put large-file.zip --multipart false
Using the vercel blob put
command with the
--multipart
option.
The following global options can be passed when using the vercel blob
command:
For more information on global options and their usage, refer to the options section.
Was this helpful?