₹200 free credit when you verify after signup, plus your first recharge doubled. Terms
Guides

Permanent public links for S3 files (images, MP4 videos)

A time-limited share link stops working after a while. If your website or app needs a link that keeps working, such as an MP4 video or product images, make a folder of your S3 bucket public. Every file in that folder then has a permanent link that anyone can open without a key, until you make the folder private again.

By the BookMyHost Cloud team · Published · Updated · Prices read live from the BookMyHost Cloud rate card, in INR, excluding GST.

See S3 storage pricesHourly billing, GST invoice, live in under a minute.

How a public folder works

You choose a folder, or the whole bucket. Anyone who knows the exact link of a file in a public folder can download it. The link is permanent and has this form: https://s3.bookmyhost.com/BUCKET/FOLDER/FILE (path-style addressing).

Public access is read-only. People can download and stream files, but they cannot upload, change or delete anything, and they cannot list what is inside the bucket or the folder, so a file is reachable only by someone who has its link.

This needs an account that has made a payment. Time-limited share links remain available on every account for temporary sharing.

Make a folder public

You can do this in mypanel or in the S3 console. In the S3 console, open it from mypanel (a console session started with only an access key and secret can show and copy public links but cannot change them).

  1. Open your bucket

    In mypanel open Storage and your bucket, or open the S3 console from mypanel.

  2. Choose the folder

    Pick Make public on the folder, or enter the folder name in the public access section. Choose the whole bucket only if every file in it may be public. The folder does not have to exist yet.

  3. Confirm

    Read the warning and confirm. Do not put private files in a public folder.

  4. Copy the link

    Use Copy public link on a file. Special characters such as spaces in the file name are encoded in the link for you.

Upload MP4 videos so they play in the browser

A file plays inline only if it was stored with the right Content-Type. Upload MP4 videos with the S3 console or an S3 client that sets Content-Type to video/mp4 (images: image/jpeg, image/png). BookMyHost does not change the Content-Type of stored files.

Seeking in a video works, because range requests are supported on public links.

Make it private again

Choose Make private on the folder at any time. The links stop working for everyone right away. Making a parent folder public includes the folders inside it, and making that parent private later does not bring the inner folders back, so publish again only the folders you want.

A bucket can have up to 10 public folders. Backup buckets that the panel manages for servers, Tally and Kubernetes cannot be made public.

Costs and limits to know

Every download of a public file counts as a GET request on your bucket, in the same way as other S3 requests. Read S3 object storage prices for the request allowance and price.

Some browsers block a PDF or an HTML page from displaying when you open its public link directly. Downloading it, or using it from your app, works. Public links are meant for images, video and downloads used by your site or app.

FAQ

Questions on this guide

Can I get a permanent public link for a file?

Yes. Make its folder, or the whole bucket, public. Each file then has a permanent link: https://s3.bookmyhost.com/BUCKET/FOLDER/FILE.

Can people see the list of files in my public folder?

No. Public access is read-only and there is no public listing. A file can be opened only by someone who has its exact link.

Can I make just one file public?

Not on its own. Put it in a folder and make that folder public.

How do I stop sharing?

Choose Make private on the folder or bucket. The links stop working immediately.

Why does my MP4 download instead of playing?

It was probably uploaded without Content-Type video/mp4. Upload it again with the S3 console or a client that sets the Content-Type.

Do public downloads cost anything?

Every download counts as a GET request on your bucket. See the S3 object storage page for the request allowance and price.

Is this available on every account?

It needs an account that has made a payment. Time-limited share links work on every account.

Create an S3 bucket

Log in, open Storage and create a bucket for your files.

Open the panel
WhatsApp