Forum Academy Marketplace Showcase Pricing Features

Display total size from a list of files

Hey,

I have a list of files, and I need to display in a text the total size of all files, is there a way I can do that natively or with javascript?

Thanks in advance :slightly_smiling_face: :computer:

Just googled it and found this

Thanks, @paul29.

The thing is that the list of files is a field and not a Type, so I cannot add a field to a field.

I have a type called House and two fields, name (type text) and files (type file and it´s a list).

I want to display the House´s file´s file size

Can you please send a screen shot of your data type?

Sure.


archivos means files in spanish, so it´s a field with a list of files (literal files).


And here you can see the type Registro that in the example is equal to House.

So I need something like Registro´s archivo´s file size

I could add a field called file size in Registro for when a user upload or delete a file, update the total file size of that Registro, but the thing is that it would only work for the new files, and I have users that have many files upladed today.

How are the files uploaded to your DB? Is it done by a workflow or is it done one by one?

With a When FileUploader´s value has changed make changes to Registro and add this file to archivos

Then when you want to display the total file sizes just do a search for registro’s file sizes:sum

1 Like

You also need to add file size field to your registro data type

1 Like

Thanks, @paul29.

NP. Can you Mark it as the solution? It helps others find the answers if they have similar questions.

This topic was automatically closed after 70 days. New replies are no longer allowed.