View previous topic :: View next topic |
Author |
Message |
The Wobbler

Joined: 06 Feb 2003 Posts: 2221
|
Posted: Thu Apr 30, 2009 8:41 am Post subject: Do we have filesize restrictions on .zips? |
|
|
Note from Castle Paradox Administration: | This content has been removed by the user. Contact the original author and link them to this post if you wish to view the original content. Only the author can remove the tags hiding this content. |
|
|
Back to top |
|
 |
Inferior Minion Metric Ruler

Joined: 03 Jan 2003 Posts: 741 Location: Santa Barbara, CA
|
Posted: Thu Apr 30, 2009 9:09 am Post subject: Re: Do we have filesize restrictions on .zips? |
|
|
Surlaw wrote: | I'm getting this error when trying to upload a 20.1 MB .zip file.
Wrong File Type application/octetstream
DEBUG MODE
application/octetstream
Line : 59
File : uploadgame.php |
Hi Surlaw,
CP currently accepts up to 32MB in a post request. This size limit could be increased, but I don't see a need at this point.
I took the download from Slime Salad and attempted to upload it without any problem. I've adjusted the application file type restriction to allow octetstream (although that's the generic "I'm a file" filetype).
Sorry for the inconvenience.
~IM _________________
|
|
Back to top |
|
 |
The Wobbler

Joined: 06 Feb 2003 Posts: 2221
|
Posted: Thu Apr 30, 2009 9:17 am Post subject: |
|
|
Note from Castle Paradox Administration: | This content has been removed by the user. Contact the original author and link them to this post if you wish to view the original content. Only the author can remove the tags hiding this content. |
|
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Thu Apr 30, 2009 10:28 am Post subject: |
|
|
Surlaw wrote: | That works, thanks.
Edit: I'm an idiot and had the .RPG file in there twice, the .zip only needed to be 10 MB. |
Still shouldn't affect your game's uploadability. _________________
|
|
Back to top |
|
 |
Inferior Minion Metric Ruler

Joined: 03 Jan 2003 Posts: 741 Location: Santa Barbara, CA
|
Posted: Thu Apr 30, 2009 12:51 pm Post subject: |
|
|
Moogle1 wrote: | Surlaw wrote: | That works, thanks.
Edit: I'm an idiot and had the .RPG file in there twice, the .zip only needed to be 10 MB. |
Still shouldn't affect your game's uploadability. |
CP's upload script explicitly looks at the mime type of the file uploaded in an attempt to limit the upload to only .zip files. For whatever reason, Surlaw's upload was treated as an application/octetstream, which simply means that a binary file was uploaded. I do not know the intricacies of Apache's mime type determination during a post request, but it seems to be browser and OS dependent. I was able to upload the file downloaded from Slime Salad without changing the upload script. To get around this in the future, I have included application/octetstream in the acceptable mime types list. _________________
|
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Thu Apr 30, 2009 1:06 pm Post subject: |
|
|
Does it still check the extension or can you upload anything now? _________________
|
|
Back to top |
|
 |
Inferior Minion Metric Ruler

Joined: 03 Jan 2003 Posts: 741 Location: Santa Barbara, CA
|
Posted: Thu Apr 30, 2009 5:51 pm Post subject: |
|
|
Moogle1 wrote: | Does it still check the extension or can you upload anything now? |
Technically, you could upload anything now, assuming Apache sees it as an application/octetstream. Again, I do not know what Apache does to determine the mime type for an uploaded file. However, the upload script will always save the file as a .zip and will always serve that .zip file back up using an application/zip mime type, so the user would need to know what the proper extension was if you didn't upload a .zip file.
I have no intention of keeping the .zip limitation in the future, but a heavy workload has severely limited my time devoted to CP development. Arbitrary file type support (as well as multiple files per project listing) has already been built into the new version of CP, whenever that gets released .
~IM _________________
|
|
Back to top |
|
 |
|