question

Sidney guiot avatar image
Sidney guiot asked

UE4 File Upload

Hi, we are evaluating playfab for our game backend.

trying to implement a simple file upload and looks like there's a missing piece :
the actual Http Put for the file

the unreal plugin provide InitiateFileUploads & FinalizeFileUploads functions, but nothing for the middle part.

looks like the PlayFabRequestHandler is exclusively sending POST requests, do i have to make an HttpRequest manually from FHttpModule ? ( would be simple to add that to plugin )

the goal is to store player ghost so it can bea loaded by friends playing on the same level at a different time.

there's little to no information about how files are stored;
Can the actual download link be computed from the player ID + file name ?
we will have more than 200 levels, so if we can avoir gather full files names from player profile every time that we want new link that would be cool ! ( thinking of api call 'GetFiles' if they are blob like files with unique id )


Also small feedback,

the postman request collection is using a v1 format and isn't compatible with current postman app

the UE4 quickstart tutorial is outof date with playfab own sdk

Have a good day,
Sidney

entities
10 |1200

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

Sarah Zhang avatar image
Sarah Zhang answered

>> looks like the PlayFabRequestHandler is exclusively sending POST requests, do i have to make an HttpRequest manually from FHttpModule ? ( would be simple to add that to plugin )

As you said, the PlayFab Unreal marketplace plugin doesn’t provide a pre-defined PUT http request method. Excepting making the http request manually from FHttpModule, you can also use the third-party Unreal REST API plugin to make the PUT request with blueprint directly, such as using the free plugin vaREST - VaRest in Code Plugins - UE Marketplace (unrealengine.com).

>> Can the actual download link be computed from the player ID + file name ?

As this documentation - File - Get Files - REST API (PlayFab Data) | Microsoft Docs said, API GetFiles requires you provide the title entity includingthe title player Idand theentity type, and it can return all entity file names and the download URLs that can be used to download the files within a limited length of time. You cannot compute the download URLs using file names and the player Id on your own.

Besides, please note, the maximum entity file number we support to upload to the title player entity, or the master player entity is 10 respectively.

For the question about PlayFab Postman Collection, there is a known issue at the PlayFabv2.json file in this repository - GitHub - PlayFab/PostmanCollection: PlayFab Postman Collection. Currently, we would suggest you follow the postman’s documentation - Importing and exporting data | Postman Learning Center to convert the Postman collection format V1 to v2 manually. And the issue of Postman Collection does not affect PlayFab Unreal Marketplace Plugin.

10 |1200

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

Sidney guiot avatar image
Sidney guiot answered

thanks @Sarah Zhang for the reply !

thanks for the rest api pluggins, i will have a look.

>>Besides, please note, the maximum entity file number we support to upload to the title player entity, or the master player entity is 10 respectively.
i thought it was a limitation to entity objects and not entity files ( but i guess they are a lite object that link to a file )

after reading some docs, as i understood, there is no 'limit' to entity lineage, so would it be possible for me to have something like :
character owns dummy ghostfiles entity that owns dummy "chapter 1"/"chapter 2"/"chapter 3" entities etc like "folders" ?


and having maximum 10 entity files per 'leaf' folder ?

what would you suggest for what we try to achieve ?

500kb ghost * 200 lvl * 200'000 players ( ghost size can be optimized, and obviously not all player will have 200 ghosts but that should fit into the 50tb max size / titles )

is it achievable "easily" with playfab ?



Side question :

if i upload a new file that has the same name 'to' a same entity does that override that file? ( i would guess so ) or to i have to clean the previous files manually ?

thanks !

1 comment
10 |1200

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

Seth Du avatar image Seth Du ♦ commented ·

As you know, Total title level entity files have 50 TB limit per title, it depends on you to restrict and verify players' data. You may also consider UGC feature -- PlayFab User Generated Content - PlayFab | Microsoft Docs. There are no specific suggestions on how to use it, but it is necessary to prevent malicious player uploading and sharing files without any limit.

----

>>if i upload a new file that has the same name 'to' a same entity does that override that file?

Yes, the file with the same name will be overridden.

0 Likes 0 ·

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.