question

officetest avatar image
officetest asked

Generic/unknown HTTP error with CDN

Hello!

I've been playing around with the CDN, reading all the documentation, etc. However, when I try to upload something from Unity, I get this error - Generic/unknown HTTP error

I am logged in, playfab is connected to my project, I use the SimplePutCall from the Playfab API, but still I get that error.

I would be very thankful if you can give me a hint on what the problem might be.

Suggestion - I think it will be a good thing to put more unity examples into the documentation (regarding all things in playfab).

Thank you in advance!

unity3dContent
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

·
brendan avatar image
brendan answered

We are indeed planning on adding more tutorials and examples. For the upload, this thread is older, but the code example in it should still be valid - can you give it a try?

https://community.playfab.com/questions/121/205469488-How-to-upload-files-to-PlayFab-s-Content-Service.html?page=2&pageSize=10&sort=oldest

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.

officetest avatar image officetest commented ·

Hey @Brendan, I used this thread + the example unity script written in the docs in the first place, but the result remains the same.

What I cannot understand, and could be the problem is what you say in that sentence - "In the case of Admin and Server API calls, they must have the Secret Key for the title in the headers"

I cannot understand where do I have to put this header in the first place. In the examples, there is a string contentType = "binary/octet-stream", which I have not changed.

Am I supposed to change it with my secret key?

0 Likes 0 ·
Andy avatar image Andy ♦♦ officetest commented ·

If you're building the request yourself, the secret key goes into an X-SecretKey header (as you can see here). If you're using one our SDKs, you provide the DeveloperSecretKey when configuring the PlayFabSettings object.

0 Likes 0 ·

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.