question

Jan Vacek avatar image
Jan Vacek asked

Minify data sent from Azure Functions - Cloudscript too large

Hello, please, how to reduce amount of data if cloudscript from Azure Functions is throwing error about response size? I cant even retrieve full user inventory from a single function. You are forcing us to use Azure Functions, but you are limiting us so, so, so much. So please, is there a way? Thank you

CloudScriptlimitsdataPlayer Inventory
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JayZuo avatar image
JayZuo answered

Currently, the limit for return response size in Cloud Functions is 65536 bytes (64KB). If the result size is too large (larger than 65536 bytes), the error CloudScriptAzureFunctionsReturnSizeExceeded will occur.

However, in your scenario, to retrieve full user inventory, there is no need to use Azure Functions. Using Client/GetUserInventory is OK.

If you need to get another player's inventory in the client, I'd suggest just returning the items you need instead of the full inventory.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.