Struggling to upload an image - Getting 504 timeout every time


#1

I am struggling to add an image to a task.
I am able to get users and projects, scan them, build a task for the right user and project, get the successful result and ID for that task and then I can’t upload my image.

I am trying hard to follow the instructions in the API creating a multipart/form Post request to:
https://app.asana.com/api/1.0/tasks//attachments

When I point my request at my own cgi script sitting on an independent server I get 200’s back and a png on the server that I have uploaded. When I point my request at asana I get timeouts. The differences I can see between the two servers is my cgi perl script and the fact that my server is running apache and asana is not. I am not sure if there is something finickey I am missing in my request and was hoping someone might shed some light on what I am missing.

Here is the wireshark capture of my request (http of course not https in this case) hitting my own server:

From what I can tell the request is well formed. NOTE: in this case I have an extra field that I think is extraneous (The task field) the docs make reference to the taskid field. That seemed redundant due to the presence of the id in the url but I have tried with and without that field just to make sure.


#2

Hi there @IGuy,

We’ve heard from a couple of our channels that there may be something awry with our attachment API endpoint. Since it uses a slightly different mechanism than our in-product attachments, it’s possible we may have a regression, or over time the API mechanism may have gotten a little crufty.

I’ve pinged the team that this is likely a bug and we’ll take a look. Sorry for the hassle, but my hunch is, you’re not doing anything wrong and we have some investigation to do on our end. Thanks!