0

I have a flex-based image upload form, and I've lost its source code. Now there appeared a problem with uploading big images (about 10MB), but with the same images an old html-based form works correctly. In my php-file there's

ini_set("post_max_size","64M");
ini_set("upload_max_filesize","64M");

Flex-based form returns file[error] = 2, that's MAX_FILE_SIZE error. It seems somewhere in flex there's an auto-generated field MAX_FILE_SIZE that it sends to server at the time it sends a file. I can't change this value in flex, so that's my question - is there a way to rewrite MAX_FILE_SIZE variable from php before php processes MAX_FILE_SIZE variable and generates error?

2
  • 1
    You might be able to change that in the HTTP server configuration on the fly, e.g. with .htaccess. Compare: stackoverflow.com/questions/6582264/… Commented Sep 26, 2011 at 13:15
  • Does that flex-based form accept any FlashVars? Commented Sep 26, 2011 at 13:18

1 Answer 1

2

You can't change that values using ini_set that's probably the problem in the first place. They can be set per directory so you can try to change their value in your .htaccess file

php_value    upload_max_filesize    64M
php_value    post_max_size    64M
Sign up to request clarification or add additional context in comments.

2 Comments

Good point. Though, UPLOAD_ERR_FORM_SIZE as value of file[error] means that "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form", so it's client-side problem as well.
certainly, but i just want to point out that point as i know this will the next breakpoint on the op process. But yes this doesn't help with the actual op problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.