question

Ethan K. G avatar image
Ethan K. G asked

Share players generated file to the others

Selected players can generate binary files locally, we want to share these files to all the other players.

As I know, we should try Entity files. How about CDN? Is CDN mandatory in this case or Entity files is capable enough?

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.

1 Answer

·
Rick Chen avatar image
Rick Chen answered

Entity files is capable enough for sharing files. To get the download link of the file we use GetFiles API. However, one player cannot access the file of the other player. If you want players to be able to access the file of other players, you could write the CloudScript to call GetFiles API, then the players can call this function by ExecuteCloudScript API and access the file link.

An example of the CloudScript:

handlers.GetShareFile = function(args,context){  return entity.GetFiles({Entity:
args.Entity});}

PlayFab CDN (Content Delivery Network) allows admin to upload files into title then client can get the files. Client cannot upload files to title. Therefore CDN does not fit in your case.

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.