question

sking avatar image
sking asked

Why am I not getting any file metadata for another entity when using PlayFabDataAPI.GetFiles?

Hello,

We are storing player data in EntityFiles and we want players to be able to get other players files. We have added an access policy statement that allows players to get other player's entity files.

For some reason, even though the player clearly has files on the playfab website, when another player tries to retrieve the MetaData via GetFiles response, the metadata count is 0 suggesting there's no files.

The code works fine for getting the file for the logged in player. Have I missed something?

The following is my policy statement which worked to prevent the unauthorised response:

  {
    "Action": "Read",
    "Effect": "Allow",
    "Resource": "pfrn:data--*!*/Profile/FILES/*",
    "Principal": "*",
    "Comment": null,
    "Condition": null
  }

Any help would be greatly appreciated!

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

·
sking avatar image
sking answered

My statement was incorrect: FILES -> files.

It would be cool if the validator could pick this up :~)

{  
"Action": "Read", 
"Effect": "Allow", 
"Resource": "pfrn:data--*!*/Profile/Files/*", 
"Principal": "*", 
"Comment": "Anyone can see files", 
"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.