different file upload error message? different file upload error message?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

different file upload error message?

Started by lnguyen, May 02, 2004, 12:17:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lnguyen

is there anyway to chage the message when a user tries to upload a file that is over the specified file size limit?  right now, if a user tries to upload something too big, they get the error "file not uploaded, check to make sure you have uploads enabled on the server" or something to that extent, i don't remember the exact wording.

its a little misleading to people I think. 

Joachim Müller

link and test user account (non-admin) with upload permissions, please.

GauGau

lnguyen


Joachim Müller

the error messages are defined in lang/your_language.php (in your case: /lang/english.php). Look up the phrase you don't like and replace it with something you like more.

GauGau

lnguyen

is that error message used for anything other than ppl exceeding file limits?  The way it is worded seems like it would be called when a directory really isn't writable by the user.

Joachim Müller

you have to understand the process: when uploading, your file is being moved to a temporary folder on your webserver. If the upload is completed, it will be moved to the target folder. If the upload fails to complete (because the file size is to big), the script only gets the information "it was impossible to move the uploaded file from the temporary folder to the target folder" and creates an error message. The script can't determine in advance wether the file will be too big. That's why you'll have to modify the error message to say additionally "Check if your pic was smaller than XXX kB". Anyway, you shouldn't let users upload large files, your webspace will soon get out of bounds...

GauGau

lnguyen

ah, I see.

as far large pics, you think 512 is too large?  I have plenty of space to use, so no worries there.  It's mostly friends and families anyway.

Thanks for explaining it!

Linh

Joachim Müller

I understand that most users don't understand how to resize a pic before uploading, that's why you'd want them to upload larger files. You'll have to find out what settings work for you. I recommend you take a look ath the XP-Publisher tool that comes with coppermine and recommend using it to your users.

GauGau