forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: Recognize on September 11, 2007, 04:57:12 am

Title: File extensions being changed to .zip
Post by: Recognize on September 11, 2007, 04:57:12 am
Hello. How is everyone?

Situation is this.

I went to Phpmyadmin and into cg_filetypes and added some allowed file types so I could upload other files other than the default ones. It worked like a charm. Expect for one file type.
The file type in question is a .pk3 file. This is an old zip file and/or type of zip file. In my case the .pk3 are used as map files for a game I play. Because I added this file extension to the filetypes it allows me to upload it but when it uploads the file it changes the extension to .zip. This wont work as a map file. It must stay a pk3.

Question

Does anyone know how to stop coppermine from changing the .pk3 exxtension to a .zip.

recognize
Title: Re: File extensions being changed to .zip
Post by: Hein Traag on September 11, 2007, 07:20:43 am
Or just zip the .pk3 file before uploading it. Or does that not matter much in the size the file wil be ?
Title: Re: File extensions being changed to .zip
Post by: Nibbler on September 11, 2007, 09:25:39 am
Coppermine should not do this. Post a link and test account.
Title: Re: File extensions being changed to .zip
Post by: Joachim Müller on September 11, 2007, 04:29:11 pm
Maybe the webserver does this. I remember old archivers (PKZIP (http://en.wikipedia.org/wiki/PKZIP)) using that sort of extension.

Anyway (@Recognize): I suggest contacting your webhost, asking them if this something on their end. You're encouraged to refer to this thread.
Title: Re: File extensions being changed to .zip
Post by: Recognize on September 11, 2007, 04:54:42 pm
-I could put the file into a zip first but then if someone were to upload a .pk3 file then it would turn into a zip.

-A test account and link

user name : []

Password : []

Link : http://www.clanxsv.org/Gallery/index.php
___________
re:GauGau post

Yeah. This could be. I'm very new to PhP and websites. The normal php downloads module allows me to upload pk3 files and download them as .pk3 files. I was thinking it may be the mime its set to. In the cg_filetypes area pk3's mime is set to application/zip...I don't have a clue.
Title: Re: File extensions being changed to .zip
Post by: Sami on September 11, 2007, 05:10:21 pm
then set the MIME TYPE to application/octet-stream instead
Title: Re: File extensions being changed to .zip
Post by: Recognize on September 11, 2007, 05:17:57 pm
I set the filetype to application/octet-stream and have the same result. It changes the file to .zip
Title: Re: File extensions being changed to .zip
Post by: Nibbler on September 11, 2007, 05:22:03 pm
I uploaded test.pk3 and it remains test.pk3. Post more details about what you are doing.

Also, don't post admin accounts on public forums. Make and post a test *user* account.
Title: Re: File extensions being changed to .zip
Post by: Recognize on September 11, 2007, 05:44:44 pm
test account (user)

username : mike
Password : password

I downloaded the file you uploaded (test2.pk3) in the mods section. It downloads as a .zip
Title: Re: File extensions being changed to .zip
Post by: Recognize on September 11, 2007, 05:48:45 pm
I looked in the ftp and user pics and the files are pk3 in there. Not sure if that helps any.
Title: Re: File extensions being changed to .zip
Post by: Nibbler on September 11, 2007, 06:25:31 pm
It's something with your web browser then.
Title: Re: File extensions being changed to .zip
Post by: Recognize on September 11, 2007, 06:39:35 pm
Hm. Your right. I was using IE 7 when downloading the files and for some reason it switched it to .zip.
I then went on firefox and it worked as it should. It downloaded the files as a .pk3.
I'd ask why it would do that for coppermine and not anything else, but that my be pushing off topic.

Thanks very much. By far the fastest support forum I've ever used.