Extract File Size


Does anyone know how to extract file size?

I have a multiuploader which uploads files on a field of a data type and a repeatinggroup that shows the list of files, but I cannot show the file size on rg nor upload it to a field with the multiuploader, just with a one-file uploader…

1 Like

If you are uploading the file details to database table then, add new field called “file_size”.
On saving workflow save file size like below,

Yes, I managed to do that with the fileuploader (single file), but not with the multiuploader (multiple files). Do you know if it’s possible with the multiuploader? Cause it can be annoying for users to upload one file each time.

Which plugin are you using for multiuploader?

If you are using “” plugin then,
just add

 .dropzone .dz-preview .dz-size{display:inline-block !important;}

to html element, file size will be displayed under filename.
For your reference:

Yes, it shows the size on the multiuploader, but I still cannot add the file size to a data type. Do you know if there’s a way to do that on the multiuploader?

Add javascript into html element. and add new input with decimal type.
Get each filesize value by javascript like
//add your code
and calculate the total size and update into input field.
hope this works.

I skipped this feature on the past days, cause I really don’t know how to use this javascript code… lol. Can you clarify the //add your code? I’d be very thankful! Cheers

You probably already know this but the regular file uploader allows you to access the file size. If knowing and storing the file size is the most important aspect to uploading the files, I have personally decided to skip the use of the multifile uploader and instead use single uploaders.

1 Like