question

Viktorov Kirill Andreevich avatar image
Viktorov Kirill Andreevich asked

Distribute file from entity files.

Hey.

In my game, players have "rooms" like an apartment in a house, I want to upload these rooms data file to the server in entity files, and then let other players download them and see the room on their client.

I load data into entity files, but when I try to read it to other players, I get an error - / File / GetFiles: NotAuthorized.

Questions

1. Am I doing the right thing when I try to save this data to entity files.

2. If not, what is the most appropriate way to do this.

3. If yes, how to get the rights to access this data from another user.

Note

The data will not be read very often, so the refresh rate is not that important.

I am considering this method, since these rooms can weigh a lot.

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

·
Seth Du avatar image
Seth Du answered

It is because of the default Entity Global Title Policy denying the read permission of Files from other entities (title player account). If you want to use Entity Files to maintain the data, you may consider modify the policy. Please navigate to [Game Manager] -> [Title Settings] -> [API features] and add the following policy:

{  
"Action":
"Read", 
"Effect": "Allow", 
"Resource": "pfrn:data--*!*/Profile/Files/*", 
"Principal": "*", 
"Comment": "Anyone can see files", 
"Condition": null  
},
3 comments
10 |1200

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

Viktorov Kirill Andreevich avatar image Viktorov Kirill Andreevich commented ·

Thanks a lot, but I already did the same =)

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Viktorov Kirill Andreevich commented ·

Does it solve your issue? Do you have any other questions on file access? I will mark this thread as solved, but feel free to tell us if you have any other questions. Thanks.

0 Likes 0 ·
Viktorov Kirill Andreevich avatar image Viktorov Kirill Andreevich Seth Du ♦ commented ·

Yes it solves my problem, thanks.

1 Like 1 ·

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.