Jump to content


Photo

HTML file uploads...not getting file?


  • Please log in to reply
4 replies to this topic

#1 AncientSage

AncientSage
  • Members
  • PipPipPip
  • Advanced Member
  • 56 posts

Posted 07 July 2006 - 03:34 AM

I have a file upload script, the php works perfectly, and the HTML part of it can upload small files without problem, but when it comes time to upload a file such as an Mp3, it is not getting it (as the php is executing as it should). The HTML script is as follows...

<form action="{FORM_ACTION}" method="post" enctype="multipart/form-data">
<input type="file" name="ufile">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<br>
<input type="submit" value="Upload">
</form>

Thanks for any help...

Note: Ignore {FORM_ACTION}, it's defined in php.

#2 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 07 July 2006 - 11:32 AM

Chances are that the MP3 file exceeds 1000000 bytes (0.95 mb). Either change the value of the hidden field MAX_FILE_VALUE or completely remove it.

#3 AncientSage

AncientSage
  • Members
  • PipPipPip
  • Advanced Member
  • 56 posts

Posted 07 July 2006 - 09:32 PM

Whoops, that might've been my problem, 'cept I've upped the value and removed it, yet it still doesn't work.

#4 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 08 July 2006 - 12:19 PM

There is also a setting in php.ini called 'upload_max_filesize'. It's default value is '2M'. You can change it by running the following command in your upgrade script:
ini_set('upload_max_filesize','whatever size you want');


#5 Gast

Gast
  • Members
  • PipPipPip
  • Advanced Member
  • 131 posts
  • LocationSouth East England

Posted 09 July 2006 - 04:26 PM

There is also a setting in php.ini called 'upload_max_filesize'. It's default value is '2M'. You can change it by running the following command in your upgrade script:

ini_set('upload_max_filesize','whatever size you want');


Also, check the POST_MAX_SIZE which is similar to the above. It needs to be roughly the same as UPLOAD_MAX_FILESIZE.
OS and Internet Specs:
Windows XP (with SP2), 1680x1050, PHP 4, MySQL 3, Internet Explorer 6 &7 /FireFox 2.0/Opera 9.2

Tutorials:
Simple Introduction to AJAX and XMLHttpRequest
Creating Live Data with AJAX Making a Google Suggest like application




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users