coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Upload => Topic started by: Torgull90 on December 02, 2004, 06:30:15 PM

Title: Cannot upload eps file
Post by: Torgull90 on December 02, 2004, 06:30:15 PM
Hi everybody,
When I try to upload a eps file, I have an error "Forbidden file extension". I use ImageMagick and I know it's working well because I use for an other apllication.
The debug info message is the following:

SER:
------------------
Array
(
    [ID] => 933697d1d2864f7b6113120165e95e60
    [am] => 1
    [liv] => Array
        (
           
Title: Re: Cannot upload eps file
Post by: Casper on December 02, 2004, 08:42:49 PM
eps is not a filetype GD or imagemagick can handle, so it cannot be uploaded as a usual image.  It can be uploaded though, by treating it as a 'document'.  It will not have a thumbnail created by this method, so you can upload a thumb at the same time, by ftp, into the same folder.  See the 'using custom thumbs' thread for exact details.

How to do it;
You need to add eps to the accepted filetypes in your database.  The easiest way, is to add the following code to the bottom of your update.sql file in the sql folder;

INSERT INTO CPG_filetypes VALUES ('eps', 'image/eps', 'document');

When you have uploaded the updated file onto your server, browse to your update.php, and your database will be done.

That's it, you should now be able to upload eps files.

Important note;  never, ever, use this method to allow uploads of any type of filetype than can be use to execute a script.  Never allow html, js, php, etc.
Title: Re: Cannot upload eps file
Post by: Torgull90 on December 03, 2004, 11:27:11 AM
Thanks you very much that's working now.

:D
Title: Re: Cannot upload eps file
Post by: smegf0rbrains on April 26, 2005, 11:11:05 AM
I have tried this for 3gp and mp4, but can't seem to get it to work. would a line of code like this work;

INSERT INTO CPG_filetypes VALUES ('3gp', 'video/3gp', 'document');

Or do i need to do something extra after replacing the original update.php file with my modified file?

thanks for any help
Title: Re: Cannot upload eps file
Post by: Nibbler on April 26, 2005, 01:46:56 PM
You don't edit update.php. You add the line at the bottom of update.sql and then browse to update.php with your web browser.