Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not interpret Content-Type as an identifier in Content-Type #14

Open
pjmuller opened this issue Feb 11, 2021 · 2 comments
Open

Could not interpret Content-Type as an identifier in Content-Type #14

pjmuller opened this issue Feb 11, 2021 · 2 comments
Assignees

Comments

@pjmuller
Copy link

Hi there,

I've been trying to upload an attachment to asana,
using your library I was always getting the asana backend error Could not interpret Content-Type as an identifier in Content-Type

The errors goes away if I remove writeStringField(mpartW, "Content-Type", contentType) from the code.
Pretty strange, I double checked that the value derived from fDetectContentType was the right one, but asana seems not to want any value?

Writing this as a help for any other developers that run into this issue ;)

@odeke-em
Copy link
Member

Thank you for this report @pjmuller, and welcome to Orijtech projects!

Perhaps they’ve changed since I last wrote this code in May 2017. Their docs at https://developers.asana.com/docs/upload-an-attachment now seem to omit Content-Type.
Perhaps we should remove it too, or place it behind some flag or sorts. Would you be interested in submitting a PR? If unable to, no biggie I can send one or someone from my team can mail one.

@pjmuller
Copy link
Author

Strange in this forum post ( https://forum.asana.com/t/api-php-attachement/14224/6 ) by an Asana staff member it also said to include the Content-Type.

But that's also 2-3 years ago.

I don't have time for a PR for the next few weeks, sorry!
Still thanks for replying so quickly :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants