upload_link
Generate a one-time link so a file dropped into chat can be uploaded and attached to an email draft; the link works once, for one file, for 10 minutes.
Instructions
Get a one-time link to upload a file the user dropped into this chat, so it can be attached to an email. Use your code tool to send the file to the link (the command is in the answer), then attach it with draft(attach_upload=[its name]). The link works once, for one file, for 10 minutes. Changes nothing else. file_name and size_mb (if you know them) let the server refuse a file that can't be sent before you upload.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size_mb | No | The file's size in MB, if you know it. | |
| file_name | No | The file's name, if you know it, so a file that can't be sent is refused before upload. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |