[Multiple File Upload] Multiple file upload - can we set max number of file each time upload

Forge Component
(51)
Published on 26 Jun by Remco Dekkinga
51 votes
Published on 26 Jun by Remco Dekkinga

Hi

Multiple file upload - can we set max number of file each time upload?


For example, I set a max limit to 10, if user upload >10 files at once, system will prompt message and not allow to proceed. May I know how to do it?

Thanks!

Regards

Xiao Hui


XiaoHui wrote:

Hi

Multiple file upload - can we set max number of file each time upload?


For example, I set a max limit to 10, if user upload >10 files at once, system will prompt message and not allow to proceed. May I know how to do it?

Thanks!

Regards

Xiao Hui


Hi XiaoHui,

For checking max no of files implement the logic in server side.

Eg. Suppose MaxFileSize = 15 MB

Calculating the size (Total uploaded files)=

CurrentFileSize + FileUpload_GetResult.FileUploadResultList.Current.FileUploadResult.FileSize > (MaxFileSize * 1024 * 1024) 

Note : CurrentFileSize is a variable of integer type

if size is more the 15MB then system will prompt message and not allow to proceed.(Only 10 files you have upload)

Please let me know if you have any query.

Regards,

AV


Amit Verma wrote:

Hi XiaoHui,

For checking max no of files implement the logic in server side.

Eg. Suppose MaxFileSize = 15 MB

Calculating the size (Total uploaded files)=

CurrentFileSize + FileUpload_GetResult.FileUploadResultList.Current.FileUploadResult.FileSize > (MaxFileSize * 1024 * 1024) 

Note : CurrentFileSize is a variable of integer type

if size is more the 15MB then system will prompt message and not allow to proceed.(Only 10 files you have upload)

Please let me know if you have any query.

Regards,

AV


thanks AV for the prompt reply and the solution. But this is not exactly what I want. 

I hope if can prompt message once the upload files are greater than the max limit although the total filesize still within the max filesize limit.

Any idea how to achieve this?

thanks!

Regards

Xiao Hui


Hi XiaoHui,

I believe this is what you are looking for.

The attached OML in the post have the logic to validate the file size validation before uploading.


https://www.outsystems.com/forums/discussion/36883/upload-a-picture/


With Regards,

Wen Kai

Wen Kai wrote:

Hi XiaoHui,

I believe this is what you are looking for.

The attached OML in the post have the logic to validate the file size validation before uploading.


https://www.outsystems.com/forums/discussion/36883/upload-a-picture/


With Regards,

Wen Kai

Thanks Wen Kai for the reply. Unfortunately, this is not what I want. 

I want to set a maximum Number of upload but not the maximum file size.

thanks.