File storage for photos and documents
A safe place for files uploaded through your website, such as photos, CVs or PDFs.
Want visitors, or yourself, to be able to upload files through your website? Think of photos for a portfolio, a CV with a job application or PDFs for your clients. Then you need File storage. On this page you switch it on and tell your AI assistant how to use it.
#What is File storage?
File storage is a separate, safe place for files that come in through your website. Think of it as an online folder that only your website may use.
Why not just inside your website? Because your website is set up completely fresh with every publish. Files your website saved in its own folder would disappear. In File storage they stay put, however often you publish.
#Step 1: switch on File storage
- Open File storage. In your dashboard, go to your website and open File storage.
- Flip the switch. We create a storage space for your website. That takes a few seconds.
- Restart or publish. Your website gets the new settings after a restart or a new publish. The dashboard tells you when that's needed.
#Public and private files
There are two kinds of files:
| Public | Private | |
|---|---|---|
| Where? | In the public/ folder |
Anywhere else |
| Who can see it? | Anyone who has the link | Nobody, unless your website creates a temporary link |
| Good for | Portfolio photos, product photos, a menu | CVs, invoices, ID documents, anything with personal data |
For private files your website creates a temporary link that stops working after a short time (say fifteen minutes). That way only someone who's logged in, or who was just given the link, can open the file.
#Step 2: tell your AI assistant
When File storage is on, your website automatically gets these settings on our server: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, S3_BUCKET and (for public files) S3_PUBLIC_URL. The storage follows the S3 standard, which your AI assistant knows well. You don't need to fill in anything.
Ask your AI assistant, for example:
I want a page on my website where I can upload photos for my portfolio. Use Switchboard's File storage: the settings AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, S3_BUCKET and S3_PUBLIC_URL are already present on the server (S3-compatible). Put public photos under the public/ folder and show them via S3_PUBLIC_URL. Put private files outside public/ and create temporary links (pre-signed URLs) for them. Make sure only I can upload.These settings don't exist on your own computer (the local preview). Ask your AI to keep uploads in a temporary folder there, and test real uploading on your published website.
#Costs and space
How much space you have depends on your plan. Under File storage in the dashboard you'll see how much you're using (updated roughly every hour). Check the pricing page or your account to see what your plan includes. Need more space? Contact us.
Tip: have your AI assistant shrink photos before they're stored. A photo from your phone is often 5 MB; for a website, 300 KB is plenty.
#Switching File storage off
If you switch it off, your website can no longer reach the files. The files themselves are kept, unless you explicitly choose to delete them. Switch it on again later and they're back.
#Next step
Read Managing your files: viewing, deleting and making a copy.