Block
Available
Free
Files and signed links
- Version
- 0.1.1
- Database part
- Yes
The contract
Takes an upload. Returns a safe stored path and a link that expires.
Settings
| Name | What it does |
|---|---|
| bucket | The app's private Storage bucket, passed to uploadFile. The app makes the bucket itself. |
| allowedKinds | The kinds of file taken, passed to uploadFile and checkFile. Defaults to pdf, png, jpeg and webp. |
| maxBytes | The largest file taken, in bytes, passed to uploadFile and checkFile. Defaults to 10 MB, and may be up to 500 MB. |
| signedSeconds | How long a signed Storage link lasts, passed to signedFileUrl. Defaults to 300 seconds, and may be 10 to 3600. |
| linkSeconds | How long a share link lasts, passed to createFileLink. Defaults to 15 minutes, and may be 1 minute to 7 days. |
Requires
Live demo
Check a file before it is stored
The size is checked first. The kind comes from the first bytes, never from the name or the type the browser sent.
Choose a file or try a sample. It is checked here and never uploaded.
Where it would be stored
- The clean name
- v2
- The stored path, under the owner's own folder
- owner-123/5f2c0e0a-demo-v2.pdf
Check a path of your own
An app that builds a path itself asks the block whether it is safe. Nothing is rewritten.
This path is refused.