|
#1
|
||
|
phUploader question
How can you make this script not upload anything if any error occurs ?
Thanks |
#2
|
||
|
If there is an error, nothing will be uploaded. However, the file can't be checked to make sure it's the right type until after it's been uploaded. That's just the way PHP works.
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#3
|
|||
|
Quote:
if ( $error > 0 ) { display some error msg... } but it is not working, if you try you will see why. |
#4
|
||
|
That would be a pretty big adjustment to the script.. you're probably better off to just delete files that were uploaded, if any in the group had an error... Try doing the below adjustments..
On line 249, after PHP Code:
PHP Code:
PHP Code:
PHP Code:
I did not test it, but it should work. You could also put the success files into an array, and if you get any errors by the end, loop through that array only to delete any uploaded files.
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#5
|
||
|
Thank you, that worked...
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|