close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Setting the size of file to upload

Thread began 12/30/2012 4:00 pm by thehalpeen319342 | Last modified 1/04/2013 11:40 am by thehalpeen319342 | 3434 views | 26 replies |

thehalpeen319342

Setting the size of file to upload

Dear Jason,

I was doing some testing on uploading jpeg images. I uploaded an image on my local server that was 1406KB and the upload gave me the attached error.

According to <?php phpinfo(); ?> - my limits for upload are 2mb and my max post size is 8mb.

Any other reason for this error?

Because of this error, I've noticed here in the forum, there is a limit on the size of files that can be sent to web assist.

Can these settings/limits be set with the upload extension?

Sign in to reply to this post

Jason ByrnesWebAssist

that error can happen when you set the upload behavior to resize the image. resizing the image can take a lot of memory on the server.

to increase the server memory, you can add the following code at line 1:

php:
<?php

ini_set
("memory_limit""256M")
?>
Sign in to reply to this post

thehalpeen319342

Jason,

I've put the code at the beginning of the page 'add_member.php' and I've got a different error - see attached - when I upload the 1406kb jpg

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the add member page please.

Sign in to reply to this post

thehalpeen319342

See attached as requested

Attached Files
add_member.zip
Sign in to reply to this post

Jason ByrnesWebAssist

your missing the following code at line 4:

php:
<?php require_once("webassist/form_validations/wavt_scripts_php.php"); ?>
Sign in to reply to this post

thehalpeen319342

Jason, excellent, that worked.

I'm just wondering, if resizing takes alot of time, should I limit the size of the file sent as WebAssist does?

How is this done?

Sign in to reply to this post

Jason ByrnesWebAssist

you can limit the uploaded file size if you like, it is entirely up to you.

In Server Validations, use the Numeric validation type. From the Bindings panel, select the "<file field name> File Size" binding.

In the numeric validation, set the maximum to the size in bytes you would like to allow.

Sign in to reply to this post

thehalpeen319342

Jason,

I tried to interpret your instructions.

I have attached a screenshot of what I did.

Files greater than 1000kb are loading and this shouldn't be the case - based on my selection.

FYI: the field name in the form and the database table is called 'photo'.

Sign in to reply to this post

Jason ByrnesWebAssist

you are using the binding for file size from the WA Uploaded Files binding group. This binding does not have a value till the file is saved to the server.

Use the file Size bindind from the Form binding group.

Sign in to reply to this post
loading

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...