# Add an attachment to a task

**URL:** <https://forum.asana.com/t/add-an-attachment-to-a-task/70301>\
**Category:** API & Developers\
**Tags:** attachments, tasks\
**Created:** [8 January 2020 09:49 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301 "2020-01-08T09:49:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asaf](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/asaf/32/45297_2.png) [@Asaf](https://forum.asana.com/u/Asaf)\
**Post date:** [8 January 2020 09:49 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/1 "2020-01-08T09:49:15Z")

</div>

Hello!  
I’m trying to add an attachment to a specific task but I’m getting this error:  
{  
“errors”: [  
{  
“message”: “file: File is not an object”,  
“help”: “For more information on API status codes and how to handle them, read the docs on errors: [Build an app with Asana](https://asana.com/developers/documentation/getting-started/errors)”  
}  
]  
}

Please advise, thanks!

> **[Screenshot](https://prnt.sc/qkr2l9)**
>
> Captured with Lightshot

![](https://us1.discourse-cdn.com/asana/original/3X/8/e/8e8f4ed7b7beebf48be84b189d1e5f478d1f80b6.png)

---

<div class="post-metadata">

**Author:** ![Asaf](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/asaf/32/45297_2.png) [@Asaf](https://forum.asana.com/u/Asaf)\
**Post date:** [8 January 2020 09:49 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/2 "2020-01-08T09:49:55Z")

</div>

![image](https://us1.discourse-cdn.com/asana/original/3X/9/f/9f4f5e951ef028fd476f9ef1017a69cb22edfc7d.png)

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [8 January 2020 10:31 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/3 "2020-01-08T10:31:49Z")

</div>

Are you giving the file location? I would suspect the API expect the blob… @Phil_Seeman any idea?

---

<div class="post-metadata">

**Author:** ![Asaf](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/asaf/32/45297_2.png) [@Asaf](https://forum.asana.com/u/Asaf)\
**Post date:** [8 January 2020 11:22 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/4 "2020-01-08T11:22:42Z")

</div>

It is possible to test it with Insomenia or I must to create it with Javascript

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [8 January 2020 11:45 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/5 "2020-01-08T11:45:40Z")

</div>

> [@Asaf](#):
>
> Insomenia

What is it? 🤔

---

<div class="post-metadata">

**Author:** ![Asaf](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/asaf/32/45297_2.png) [@Asaf](https://forum.asana.com/u/Asaf)\
**Post date:** [8 January 2020 13:23 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/6 "2020-01-08T13:23:54Z")

</div>

A rest api client where you can send http requests, same as Postman

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [8 January 2020 15:08 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/7 "2020-01-08T15:08:05Z")

</div>

Hi @Asaf,

I can’t tell for sure without seeing your whole request but it looks like you’re trying to pass just a filename. As @Bastien_Siebman says above, you need to pass the binary contents of the file.

You might find these forum posts helpful:

> [@How to upload a file to a task in ASANA api using c#](https://forum.asana.com/t/how-to-upload-a-file-to-a-task-in-asana-api-using-c/44189):
>
> I’m trying to attach a file to a task in Asana through the C# and I’m getting an error: {"errors":[{"message":"file: Missing input","help":"For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors"}]} The request I’m making has the following format. static async void GoPost(byte[] image) { string ApiKey = "\<API\_KEY\>"; HttpClient httpClient = new HttpClient(); httpCli…

> [@API php attachement](https://forum.asana.com/t/api-php-attachement/14224/5):
>
> Hi ! You seem use the wrapper. I don’t use it. But, it give me many informations that i will try. Thank you.

In terms of testing, I’m also not familiar with Insomenia but Asana provides a full collection of samples of their API calls for use in Postman here, including the “Upload an attachment” endpoint:

> **[Build an app with Asana](https://developers.asana.com/docs)**
>
> Learn the basics of Asana's developer platform

---

<div class="post-metadata">

**Author:** ![Asaf](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/asaf/32/45297_2.png) [@Asaf](https://forum.asana.com/u/Asaf)\
**Post date:** [9 January 2020 13:32 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/8 "2020-01-09T13:32:11Z")

</div>

Hey, The problem I’m facing is only attaching a file using Postman/Insomnia for test purposes…

I’ve downloaded the Postman collection but I find that you don’t have this option to attach a file to a task built in… so I still need help over here.

I would very much appreciate it if you can let me know how can it be done…  
I also attached 2 images that show that this step is existing on the Documentation but missing on the Postman collection.

 ![Screenshot_3](https://us1.discourse-cdn.com/asana/original/3X/4/9/4975d29f3310aa05a0d4d729a64d829bb7e90e80.png) ![Screenshot_4](https://us1.discourse-cdn.com/asana/original/3X/4/2/42ead1b1ccd012b2c8c317dfc6ad408d7aa1c969.png)

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [9 January 2020 17:05 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/9 "2020-01-09T17:05:51Z")

</div>

Not sure why they organized it this way but it’s in the Postman collection under “Tasks”:

![image](https://us1.discourse-cdn.com/asana/original/3X/e/1/e1550ae81fa61d874d454a55ba555d9a331ed54f.png)

---

<div class="post-metadata">

**Author:** ![Asaf](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/asaf/32/45297_2.png) [@Asaf](https://forum.asana.com/u/Asaf)\
**Post date:** [9 January 2020 19:46 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/10 "2020-01-09T19:46:23Z")

</div>

Hey, thanks for the help.  
But, no matter what I’m trying I’m getting the same error…

 ![image](https://us1.discourse-cdn.com/asana/original/3X/d/3/d3c8fa3b460113a810ed519e1582cce38e60db2b.png)  
When I set clicked on Upload an attachment the value was   
I tried to search online Image to Binary convertor but all I tried still getting the same error.  
I tried to encode an image to base64 and still the same error.  
Please let me know if you find a solution.

Thanks

---

<div class="post-metadata">

**Author:** ![Asaf](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/asaf/32/45297_2.png) [@Asaf](https://forum.asana.com/u/Asaf)\
**Post date:** [10 January 2020 08:00 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/12 "2020-01-10T08:00:41Z")

</div>

Thank you for the clarification!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:07 UTC](https://forum.asana.com/t/add-an-attachment-to-a-task/70301/13 "2025-05-30T19:07:21Z")

</div>

Closed on 30 May 2025 19:07 UTC


