Jump to content

Archived

This topic is now archived and is closed to further replies.

AncientSage

HTML file uploads...not getting file?

Recommended Posts

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

[code]
<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>
[/code]

Thanks for any help...

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Whoops, that might've been my problem, 'cept I've upped the value and removed it, yet it still doesn't work.

Share this post


Link to post
Share on other sites
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:
[code]ini_set('upload_max_filesize','whatever size you want');[/code]

Share this post


Link to post
Share on other sites
[quote author=Daniel0 link=topic=99746.msg393514#msg393514 date=1152361150]
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:
[code]ini_set('upload_max_filesize','whatever size you want');[/code]
[/quote]

Also, check the POST_MAX_SIZE which is similar to the above. It needs to be roughly the same as UPLOAD_MAX_FILESIZE.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.