Computer Science Canada Need help uploading multiple files |
Author: | Numbah51 [ Sat Nov 11, 2006 8:48 pm ] | ||||
Post subject: | Need help uploading multiple files | ||||
I want one to be an image and one to be a wmv. here is my code:
videoadd.php:
The non-wmv file always uploads but wmv's never do. Any help would be greatly appreciated. Thanks. |
Author: | octopi [ Sun Nov 12, 2006 2:50 pm ] | ||||
Post subject: | |||||
Hello, A simpler way to do this would be as follows:
php:
however if you are going to be uploading many many files, then I would do it the other way. (but I'm not sure why its not working) This way should work, let me know if it doesn't. |
Author: | octopi [ Sun Nov 12, 2006 2:59 pm ] |
Post subject: | |
Also I was reviewing your html code, and you look like your doing some dangerous things....It looks like your passing the next highest SQL record in the html code. This creates a race condition. User A loads the html page, and User B loads the html page at roughly the same time. (Both would have the same number.) Then User A finally fills out the form and submits it. User A has now taken that number, so what happens when User B submits the form, with the same number? Also you passing the date via hidden variables too. Do you trust your users? it is very easy to fake that information. (Same applies to the number) UploadedBy could also be changed to make it appear that it comes from a different user. |
Author: | Numbah51 [ Sun Nov 12, 2006 9:46 pm ] |
Post subject: | |
They are very trusted users and i don't think i have to worry about the number thing because i dunno how to explain it but it should't make a difference. |
Author: | Numbah51 [ Tue Nov 14, 2006 8:02 pm ] |
Post subject: | |
That still doesn't help. The WMV file still fails to upload. And its not anything about the script i don't think because i can upload 2 images and it works. Any other suggestions (if you have any) would be great. |
Author: | r.3volved [ Tue Nov 14, 2006 8:47 pm ] |
Post subject: | |
Did you check that the wmv filesize is within your upload constraints AND within the php.ini max upload range? Sounds like it's just too big. You could always try an ftp upload instead. |
Author: | Amailer [ Wed Nov 15, 2006 10:21 pm ] |
Post subject: | |
If the page stops loading (without an execution timeout error) then its to big :/ You have to increase your post_max_size, upload_max_filesize and max_execution_time (I think max_input_time too, check out the Related Configurations Note: for the POST method uploads) I tired all this though and - ugh - it just takes forever to upload, would be so much faster to just give them ftp access. |