question

Stefano Zinna avatar image
Stefano Zinna asked

Getting the entity files for all user in leaderboard

Hello,

I am using the script in this page to get the entity files from all users in the leaderboard.

https://learn.microsoft.com/en-us/gaming/playfab/features/entities/entity-files

The OnGetFileMeta() function writes "Loading 0 files" for the other users while it finds the file for the same user. I set the policy for entity files "Allow Anyone to read access the file". Some one has an idea of which could be the problem?

unity3dLeaderboards and Statisticsentities
10 |1200

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

Stefano Zinna avatar image
Stefano Zinna answered

Hello.

I am using this approach to upload in entity files the user avatar.

I realized that in the policy I set the filename (that anyone was allowed to read) without extension and that the name did not match with the one that I was uploading (with extension). After adding the extension to the file in policy the procedure is working.

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.

Xiao Zha avatar image Xiao Zha commented ·

Glad to hear your issue solved. If you have any other questions, please feel free to let me know.

0 Likes 0 ·
Xiao Zha avatar image
Xiao Zha answered

Since it's not a common situation to get entity files from all users in a leaderboard, may I know what functionality you're trying to achieve? And I have tested the GetFiles Api in Postman, once you set the global entity policy to “Allow Anyone to read access the file”, anyone can get all files of other players by calling GetFiles API with other player’s title_player_account Entity. So, I can’t reproduce your issue. And here is my Policy Json which set in [Title settings]->[API Features] page:

 {
     "Action": "Read",
     "Effect": "Allow",
     "Resource": "pfrn:data--*!*/Profile/Files",
     "Principal": "*",
     "Comment": " Allow Anyone to read access the file",
     "Condition": null
   }
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.