Form File Upload

Hi everyone!

I need to send a file or image through the Form Widget. I noticed that the file URL appears in the scope metadata only when the option to send it to the bucket is enabled. Is there a way to display the URL directly, or any method to convert the file/image to send it to Tago?

Using Send to Bucket

Without using the ‘Send to Bucket’ option.

Hi Geovane,

To retrieve the file URL, enabling the Send to Bucket option is necessary, as this is what makes the URL appear in the metadata.

Could you please provide more details about your specific use case? I want to ensure I fully understand your needs. Are you looking to upload this image/file to TagoIO’s File Storage, or is there another functionality you’re trying to achieve?

Hello, Mateus!

Actually, I don’t want to use send to bucket. My idea is for the user to upload the file through the form, and then I have two options:

  1. I receive the file and save it in Tago.
  2. Tago stores the file and returns a URL.

I prefer the first option, but the issue is that I only receive the md5 and path in the scope. I imagine that’s not enough for me to send the file to Tago.

Hello Geovane Silva,

When the **Send to Bucket** option is enabled, any file uploaded through the form is automatically saved in TagoIO, so no additional action is required on your part.

If you wish to show this file in a table, you can use the file’s URL for users to download it. This URL is stored in the metadata.file.url field of the variable. You can utilize the formula option in the widget’s settings to show this information. E.g. $metadata.file.url$.

For further guidance, please check the following documentation links:

Hi Mateus,

Yes, I understand that. What I want is not to use the Send To Bucket option. In my understanding, it doesn’t make sense for a form with a file field to require this option to be enabled in order for Tago to receive the file. There should be a way to disable it and receive the file’s binary directly, allowing me to handle it via code in Tago or store it in a database.

With this option enabled, the process becomes more complicated because there are form fields that I process in the code before saving. If the file is sent directly to the bucket, I will have to delete it, process it, and send it again, which makes the workflow less efficient.

Hi Geovane,

At this moment, the Send to Bucket option is required for handling files uploaded through the Form Widget. This is because the file storing mechanism on our back-end is tightly coupled with this feature

We understand that this can complicate workflows—especially when you want to process the form data before storing the file in TagoIO or another database. Unfortunately, there isn’t a current workaround to directly receive the file’s binary data from the widget without using the bucket.

I want to let you know that we are considering a future change to remove this requirement. However, even with that change, the file will still be stored in the File System to avoid the challenges associated with transmitting large file sizes through our workflow triggers to the analysis. At this point, rearchitecting this behavior is quite complex due to how we handle widget data internally.

I appreciate your patience and your feedback on this feature. If you have any more questions or need further assistance, please let me know!