Get saved file size information

Hi,

I use zeroqode audio recorder to record a wav file. It uploads to s3.
Now I’d like to check the uploaded file size.

Is there a way to find the size of the file uploaded to s3. We can see it in the file manager. But i’d like to expose it on the UI.

Other suggestions are to save the file size on upload, however the recorder plugin doesn’t expose that state.

Thanks
ZubairLK

1 Like

I’m looking for this too. Seems like a pretty obvious/common feature that you’d wanna be able to cap each users total uploads to a set limit… surprised if this isn’t a feature by now.

2 Likes

OK found the answer (sort of, not specifically for audio recorder)… you have to save file size with a workflow as each upload is complete (eg with Uppy Uploader). In the same workflow you can the update a running total for each user.

Thanks for the update James, I’ll probably need this at some point.

1 Like

If you can get a file’s size with an uploader element, you should be able to get it in other cases. Hopefully they’ll be able to add this soon. :disappointed: :

1 Like

Hear, hear, @samnichols! Were you able to find a way to do this?

Not quite, unfortunately. You can use a workflow to add up the file size of uploaded files, but Bubble stores a file size’s value before compression occurs, so it’s nowhere near accurate. For example, I could upload a 2mb file, Bubble compresses and resizes it upon upload to 800px max, the resulting file is (let’s say) 150kb, but in a workflow getting the uploader’s file size, Bubble still takes the original file size for the workflow. Haven’t found a workaround, and honestly for us, it was more curiosity than necessity, so we scrapped this.

1 Like

Thanks for the quick reply. I’m trying to find the file size of images stored in the database as opposed to uploaded files, which has proven to be tricky.

1 Like

The only way I could think to do it off-hand is to upload them to another platform like S3 or Wasabi and grab the file size during the transfer.

1 Like

I saw one suggestion to grab the image url and run it through a script to extract the size. Might be the most direct way atm.

1 Like