coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: lnguyen on May 02, 2004, 12:17:21 AM

Title: different file upload error message?
Post by: lnguyen on May 02, 2004, 12:17:21 AM
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. 
Title: Re: different file upload error message?
Post by: Joachim Müller on May 02, 2004, 11:20:34 AM
link and test user account (non-admin) with upload permissions, please.

GauGau
Title: Re: different file upload error message?
Post by: lnguyen on May 02, 2004, 07:19:44 PM
http://kineticphoto.net

login/pass: cpgtest/cpgtest


Title: Re: different file upload error message?
Post by: Joachim Müller on May 02, 2004, 10:30:36 PM
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
Title: Re: different file upload error message?
Post by: lnguyen on May 03, 2004, 05:19:18 AM
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.
Title: Re: different file upload error message?
Post by: Joachim Müller on May 03, 2004, 07:37:29 AM
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
Title: Re: different file upload error message?
Post by: lnguyen on May 04, 2004, 05:29:53 AM
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
Title: Re: different file upload error message?
Post by: Joachim Müller on May 04, 2004, 07:43:40 AM
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