question

dcooley avatar image
dcooley asked

Can I upload a directory to Playfab content? Or does the admin api only support individual file uploads?

The directory I would like to host on playfab/content/filemanagement is only about 52 mb, but it is taking over about an hour to upload. This is due to the structure of the directory being many, small files. For each file I am currently making a request to 'getcontentuploadurl' and then actually making the upload request. All of these requests are starting to take a lot of time. Is there a way to make one getcontentupload url request and then upload a directory to it?

Content
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

·
Citrus Yan avatar image
Citrus Yan answered

Sorry, no, you cannot upload a whole directory to PlayFab CDN, it only takes a single file per request. You might consider zipping the directory and upload it as a single file.

2 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.

dcooley avatar image dcooley commented ·

Thank you for your response! I thought that was the case, but I was hoping for magic. Unfortunately I need all the individual files to be available to different clients at different times, so I can not do a zip upload. Does the python SDK or C# SDK have directory upload capabilities? I am thinking about going one of those routes so I can async and multithread my uploads, assuming I continue needing to do individual file uploads.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan dcooley commented ·

No, they don't. Although you can use python/C#'s async abilities to help you speed up the process.

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.