Create buckets and upload files
Create a storage bucket, organise it with folders, upload files from the Console and copy their links.
Storage is where your project keeps files: user avatars, documents, images, exports. Files live in buckets, and every project has its own isolated storage, so one project can never see another's files.
Open Storage
In your project's left sidebar, under Core Services & Infrastructure, choose Storage Vault. The page shows the storage used by your project, the number of buckets, the number of stored objects, and your Edge CDN Base address, which is https://<your-project>.pgbhub.app/storage/.
Note: The usage bar covers a pool shared between your files and your database. The Console shows how much of it you have used.
Create a bucket
- Choose Create Bucket (or Create First Bucket on a new project).
- Enter a Bucket Name: 3 to 63 characters, using lowercase letters, numbers and hyphens only.
- Under Access, choose Public: anyone with a file's URL can read it or Private: members, the secret API key, or signed links only. If you are unsure, pick private. You can change it later.
- Choose Create Bucket.
The bucket list shows each bucket's Bucket Name, Objects, Size and Access (Private or Public Link).
Upload a file
- Choose Open Bucket on the bucket.
- Choose Upload. In the dialog, choose a file under Select File. Optionally type a Sub-folder Path to put it in a folder.
- Choose Upload File.
To make a folder first, choose Create Folder, enter a Folder Name and confirm. Folders are shown with a trailing slash and you move into them with Open and back with .. (Go up one folder).
The object table shows each Name, Type, Size, Last Modified, a Direct Link action, and Delete.
Get a link to a file
- In a public bucket, choose Copy Link to copy the file's address. Anyone with it can open the file.
- In a private bucket, choose Copy Signed Link. This makes a temporary link valid for 15 minutes. See Private buckets and signed links.
- View / Download opens the file from the Console.
Delete things
Delete on an object removes that file. Delete Bucket (inside a bucket) removes the bucket. Both are permanent, so check before you confirm.
Good to know
- Files uploaded from the Console are limited in size per file. If a file is too big, the upload is refused with a message.
- Public files are served with long-lived caching for speed. If you replace a file, give it a new name so visitors do not see an old copy.
- Browsers show images, video, audio, text, PDFs and JSON inline. Other types download.
- Uploading from your own code is covered in Upload files from your app.