2
0
Files
bot/apps/docs/editor/blocks/inputs/file-upload.mdx
Baptiste Arnaud 6215cfbbaf (fileUpload) New visibility option: "Public", "Private" or "Auto" (#1196)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced file visibility options for uploaded files, allowing users
to set files as public or private.
- Added a new API endpoint for retrieving temporary URLs for files,
enhancing file accessibility.
- Expanded file upload documentation to include information on file
visibility settings.
- Updated URL validation to support URLs with port numbers and
"http://localhost".
- **Enhancements**
- Improved media download functionality by replacing the `got` library
with a custom `downloadMedia` function.
- Enhanced bot flow continuation and session start logic to support a
wider range of reply types, including WhatsApp media messages.
- **Bug Fixes**
- Adjusted file path and URL construction in the `generateUploadUrl`
function to correctly reflect file visibility settings.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-30 08:02:10 +01:00

42 lines
1.4 KiB
Plaintext

---
title: File upload
icon: upload
---
The File upload input block allows you to collect files from your user.
<Tabs>
<Tab title="Flow">
<Frame>
<img
src="/images/blocks/inputs/file-upload-flow.png"
alt="File upload input in flow"
className="rounded-lg"
/>
</Frame>
</Tab>
<Tab title="Bot">
<Frame>
<img
src="/images/blocks/inputs/file-upload-bot.png"
alt="File upload input in bot"
className="rounded-lg"
/>
</Frame>
</Tab>
</Tabs>
The placeholder accepts [HTML](https://en.wikipedia.org/wiki/HTML).
## Size limit
There is a 10MB fixed limit per uploaded file. If you want your respondents to upload larger files, you should ask them to upload their files to a cloud storage service (e.g. Google Drive, Dropbox, etc.) and share the link with you.
## Visibility
This option allows you to choose between generating public URLs for the uploaded files or keeping them private. If you choose to keep the files private, you will be able to see the file only if you are logged in to your Typebot account.
Note that if you choose to keep the files private, you will not be able to use the file URL with other blocks like Attachment in the Send email block or others. These services won't be able to read the files.
By default, this option is set to `Auto`. This means that the files will be public if uploaded from the web runtime but private if uploaded from the WhatsApp runtime.