You are viewing limited content. For full access, please sign in.

Question

Question

File Upload - Maximum TOTAL file size

asked on September 3, 2019

Hello, I'm sorry if this has been asked before. I couldn't find a similar question.

In Forms, I know I can limit the size of an individual file, and I can limit the total number of files. But we would like to limit the total size of multiple files. So a submitter can upload as many files as they need to, so long as the total does not exceed a specified amount. Is this possible? Thanks!

1 0

Replies

replied on September 3, 2019

I've never done this before and there's no built-in option. I'd really like to see this as a feature as well because it would really help with one of my biggest business processes.

 

It would be a bit tricky, but is possible you could do it with javascript.

Each file upload input has an accompanying div with the "fileUploadSize" class which in turn has an attribute called "fsize" and another called "res"

fsize stores the file size numeric value

res stores a value indicating you whether the number is in KB, MB, etc. (STR_SIZE_KB, STR_SIZE_MB, etc.)

 

You could add a change event handler to try and detect whenever the files change, then add up the totals to check against your maximum.

You would need to convert the different sizes to get an accurate total, but it should be possible in theory.

 

Are you using a single upload field, a collection, or a table? Depending on how your form is set up, it could be more difficult to get the right event handler configuration.

1 0
replied on July 18, 2022

Hi Jason, I am looking to use that attribute but I am no programmer. Is there a way this can be explained to someone with no programming skills?

I have a process in Forms and the last step is saving a form with all the documents uploaded to Laserfiche and it would be helpful to get that information so I can use it later in Workflow.

Thank you.

0 0
replied on July 18, 2022

Andrea,

If you're using it in Workflow, you actually don't need to go through all the hassle of coding something into your form.

In the workflow, just retrieve the "File Upload" variable using the Retrieve Business Process Variables activity.

Then, you can add a For Each File loop and the file size will be available right three as a token.

This method will be a lot more reliable than using JavaScript since JavaScript is client-side and can be impacted by the user's browser/behavior.

 

Additionally, once the files are saved to the repository, the size can be retrieved from the Electronic File Size property/token of the entry, so depending on your process you might not even need the For Each File loop.

0 0
replied on July 28, 2022

thank you for the information Jason, As the files are store in Laserfiche already. I am adding the "Electronic File Size" property of each file.

However I am not getting the correct file size. Do you the format of the Electronic File Size? Is this KB, MB. Should I use an integer or number type for the token?

0 0
replied on July 28, 2022

@████████ You're probably not getting the wrong size.

The Electronic File Size is stored/returned in bytes since KB, MB, etc. are really only used for display purposes.

What's worth noting is that Windows and most other environments calculate these in increments of 1024 not 1000 (i.e., 1 kilobyte = 1024 bytes)

So a 2KB file would be 2048 bytes (1024 * 2)

A 2MB file would be 2097152 bytes (1024 * 1024 * 2)

And so on

If by type you mean Tags, those really only matter for conditional evaluations, but number and/or long integer would be fine (you can choose more than one, just uncheck String).

 

0 0
replied on July 28, 2022

Is this the right approach though? If your total size come up as being too high, what do you do? The form has long been submitted at this point and there's no user present.

1 0
replied on September 3, 2019

I'm using a single upload field. The business process owner requested that uploaded files be included as attachments to an email notification. So, of course, we can't exceed the file size limit of our email server, which is 25MB.

0 0
replied on September 3, 2019

I may have spoken too soon. It looks like they changed the underlying elements for the file upload type in 10.4 because I don't see those attributes anymore.

The forms I created before updating have them, but when I add a new file upload or even try to duplicate one on an existing form, those elements and attributes are gone.

Instead, there just seems to be a div with the class "imgSize" that stores it in plain text rather than with a numeric value.

0 0
replied on September 3, 2019

Thanks for your help anyway, Jason. Maybe I can take the text and slice the KB/MB part off. Or maybe I can convince the process owners to do something else! :)

0 0
replied on September 3, 2019

You could definitely try splitting off the KB/MB part, parse the numeric portion into a numeric format, and use the KB/MB part to adjust the total as needed.

My concern would be that it could potentially break if they change things again.

0 0
replied on July 10, 2020

The latest Forms 10.4.4 still has the fsize attribute.

0 0
replied on September 2, 2021

Just to confirm as this question came up today during a meeting, there is no actual max file size limit for a form submission, correct? We have a application process that we are building and it will require a lot of document attachments (ex. 13 paystubs). We have limited the file size for individual attachments but I do not want to run into a situation where we have failures due to exceeding some file limit. 

0 0
replied on September 7, 2021 Show version history

Based on how Forms handles file uploads there should not be any hard-coded total upload limit.

I seem to recall having technical problems testing one of my processes, but only when the total uploads were like in the 1GB range (I can't remember if it was the submission, or the save to repository step that had issues).

That process takes in about 10k documents a day and process supports up to 10 files at up to 50MB each, so I wouldn't expect 13 pay stubs to be a concern.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.