close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

how to validate upload file size limit?

Thread began 9/05/2016 1:11 am by tony | Last modified 9/06/2016 9:10 am by Ray Borduin | 2050 views | 5 replies |

tony

how to validate upload file size limit?

Hi all,
I need to set a maximum file size upload in my form, so that users can't upload file larger than 30MB.
Actually the php.ini allow 100MB files.
But I can't find a way to set this limit using data assist.
I can specify file extensions but not file size.
Is there a way to do this?
TIA
tony

Sign in to reply to this post

Ray BorduinWebAssist

You can use server validation and validate the file size attribute from the upload using number validation.

Sign in to reply to this post
Did this help? Tips are appreciated...

tony

Originally Said By: Ray Borduin
  You can use server validation and validate the file size attribute from the upload using number validation.  


Is this correct?

1- 2016-09-06 09_05_40-Server Validations_ file size.png
2- 2016-09-06 09_05_40-Server Validations_ file size number validation.png

What format number should I choose?
TIA
tony

Sign in to reply to this post

HBak82161085

That should work. US format should be fine. I don't think it will actually matter since no commas or decimals will be in the number anyway.

Sign in to reply to this post

tony

Originally Said By: HBak82161085
  That should work. US format should be fine. I don't think it will actually matter since no commas or decimals will be in the number anyway.  


Thanks for the reply.
But how can I set a size limit of 20MB?
Should I set Maximum to 20480000 (20 480 000)?

I tried everything with different format (english, european, international) but it always fail validation.

In the panel bindings there is another series of server values:
example:
uploads/[FileName]: File Size
... where "uploads" should be my upload folder.

What can I do whit these values? Should I use them instead of the first ones (se my attachment above)?

Sorry for all these questions but unfortunately I'm in a hurry.

Thanks Again for your help.

tony

Sign in to reply to this post

tony

Ok, after an heavy trial-and-error session, I found the solution.
I was using the wrong value from the binding panel.
Now I used the "file size" that you find below the form field (not the one under "upload file (my_field)").
I set a limit using the international format and set it to 5120000 to limit file size to 5MB.
Now it works.
Thanks to all for the help.
Just a note of disappointment for the online help system. I can't find any reference to all the bindings value created by the WA extensions related to file upload.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...