Hope someone can help with this. Have a file upload script that all seemed to be working fine, using the PHP component that resizes images (forget it's name).
So it checks the file name is unique, checks it's a jpg, gif, bmp or photoshop file as requires, and has a max file size line to limit it's size.
However, it seems that with any file over around 2MB, it's not uploading, and we're getting the error about it not being a jpg or gif.
The line in the upload page is :
It did have a default value of 25000 but I changed it to 80000, but still the same problem.Code:<input name="uploadFile" type="file" size="55"> <input type="hidden" name="MAX_FILE_SIZE" value="80000" />
Some code from the validation page :
Any ideas?Code:$ValidationFailed = false; if (($_FILES["uploadFile"]["type"] == "image/gif") || ($_FILES["uploadFile"]["type"] == "image/pjpeg") || ($_FILES["uploadFile"]["type"] == "image/tif") || ($_FILES["uploadFile"]["type"] == "image/png") || ($_FILES["uploadFile"]["type"] == "image/photoshop") || ($_FILES["uploadFile"]["type"] == "image/bmp")) { if ($_FILES["uploadFile"]["error"] > 0) { $ValidationFailed = true; $FTGvalid_file_errmsg = "Error: " . $_FILES["file"]["error"]; $ErrorList .= $FTGvalid_file_errmsg . '<br/>'; } } else { $ValidationFailed = true; $FTGvalid_file_errmsg = "Please select a valid image file type. The library supports .jpg, .gif, and .png files."; $ErrorList .= $FTGvalid_file_errmsg . '<br/>'; } if (!empty($_FILES['uploadFile']['name']) && file_exists("Photos/" . $_FILES["uploadFile"]["name"]) && is_file('Photos/' . $_FILES['uploadFile']['name'])) { $ValidationFailed = true; $FTGvalid_file_errmsg = "This file has already been uploaded. If you are sure it's a new photo please rename it before uploading to the library."; $ErrorList .= $FTGvalid_file_errmsg . '<br/>'; }





Bookmarks