Sign In Register

How can we help you today?

Start a new topic
Answered

Downloadables File size limit

Hey there!

I've been using Gamespark for a little more then 2 weeks now and am extremely satisfied with it.
Lately I've been running into some problems with the binary downloadables tough.

I am trying to upload a binary data file following this example code: https://support.gamesparks.net/support/discussions/topics/1000050374.
For small files this is working great but with bigger files (around 4mb) i keep getting an error message simply saying "Server Error 500".

I assume there is an internal file size limit that doesn't seem to be documented anywhere. Is there any way I can increase this limit or alternatively is there some kind of intendet way to work around this limitation?

I also don't seem to be able to view my uploaded data in the Downloadables tab on the site eventough I can download them correctly. Is user uploaded binary data simply not visible in that view or am I doing something wrong in the upload?


thanks


Best Answer

Hi Inko, 


I believe the limit for user uploadables is 4mb so that's why you are seeing the error when uploading files bigger than this. It sounds like you are getting uploadables and downloadables mixed up here. Downloadables would be content such as developer created DLC, i.e new level packs or extra game content. Uploadables would be considered player-created content. Files such as photos or custom levels which get sent from the game and stored on GameSparks would fall into this category. You won't see user uploaded files in the downloadables tab on the portal. If you add the following to your User>UploadCompleteMessage you will be able to add the uploaded files details from the message to a custom collection.


var dataToGrab = Spark.getData().uploadData;

var uploadedFiles = Spark.runtimeCollection("uploadedFiles");

var success = uploadedFiles.insert({"uploadedData":dataToGrab})

 

If you are deleting uploadables using deleteUploadedFile it would also be worth removing the associated document from your custom collection while you are doing it. If you have any further questions or want to give us any details on what your exact requirements are just let us know. 


Thanks,

Liam


Hi Leigh,


Please refer to our system limits documentation for details on this. The page can be found here.


Regards,

Liam

What's the size limit for downloadables - for potential release, DLC and patch distribution?

Answer

Hi Inko, 


I believe the limit for user uploadables is 4mb so that's why you are seeing the error when uploading files bigger than this. It sounds like you are getting uploadables and downloadables mixed up here. Downloadables would be content such as developer created DLC, i.e new level packs or extra game content. Uploadables would be considered player-created content. Files such as photos or custom levels which get sent from the game and stored on GameSparks would fall into this category. You won't see user uploaded files in the downloadables tab on the portal. If you add the following to your User>UploadCompleteMessage you will be able to add the uploaded files details from the message to a custom collection.


var dataToGrab = Spark.getData().uploadData;

var uploadedFiles = Spark.runtimeCollection("uploadedFiles");

var success = uploadedFiles.insert({"uploadedData":dataToGrab})

 

If you are deleting uploadables using deleteUploadedFile it would also be worth removing the associated document from your custom collection while you are doing it. If you have any further questions or want to give us any details on what your exact requirements are just let us know. 


Thanks,

Liam

Login to post a comment