Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Do we have filesize restrictions on .zips?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> Site Suggestions
View previous topic :: View next topic  
Author Message
The Wobbler




Joined: 06 Feb 2003
Posts: 2233

PostPosted: Thu Apr 30, 2009 8:41 am    Post subject: Do we have filesize restrictions on .zips? Reply with quote

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
Back to top
View user's profile Send private message
Inferior Minion
Metric Ruler



Joined: 03 Jan 2003
Posts: 741
Location: Santa Barbara, CA

PostPosted: Thu Apr 30, 2009 9:09 am    Post subject: Re: Do we have filesize restrictions on .zips? Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
The Wobbler




Joined: 06 Feb 2003
Posts: 2233

PostPosted: Thu Apr 30, 2009 9:17 am    Post subject: Reply with quote

That works, thanks.

Edit: I'm an idiot and had the .RPG file in there twice, the .zip only needed to be 10 MB.
Back to top
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3378
Location: Seattle, WA

PostPosted: Thu Apr 30, 2009 10:28 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
Inferior Minion
Metric Ruler



Joined: 03 Jan 2003
Posts: 741
Location: Santa Barbara, CA

PostPosted: Thu Apr 30, 2009 12:51 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3378
Location: Seattle, WA

PostPosted: Thu Apr 30, 2009 1:06 pm    Post subject: Reply with quote

Does it still check the extension or can you upload anything now?
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Inferior Minion
Metric Ruler



Joined: 03 Jan 2003
Posts: 741
Location: Santa Barbara, CA

PostPosted: Thu Apr 30, 2009 5:51 pm    Post subject: Reply with quote

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 Oookay....

~IM
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> Site Suggestions All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group