# Cannot upload a file through the API with the synchronous parameter

**URL:** <https://meta.discourse.org/t/cannot-upload-a-file-through-the-api-with-the-synchronous-parameter/43799>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [6 Mayo, 2016 14:33 UTC](https://meta.discourse.org/t/cannot-upload-a-file-through-the-api-with-the-synchronous-parameter/43799 "2016-05-06T14:33:05Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![PeterWells](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@PeterWells](https://meta.discourse.org/u/PeterWells)\
**Post date:** [6 Mayo, 2016 14:33 UTC](https://meta.discourse.org/t/cannot-upload-a-file-through-the-api-with-the-synchronous-parameter/43799/1 "2016-05-06T14:33:05Z")

</div>

I have been trying to add uploaded files through the API using PowerShell. The call appears to work correctly when I use it to upload an image file, but if I try the same call with a `synchronous=1` parameter added, it returns with a 500 error.

Based on [a previous topic](https://meta.discourse.org/t/using-the-discourse-api-to-post-with-uploaded-files/29833/20), I had hoped to use the synchronous feature to get the file url.

---

_[View the full topic](https://meta.discourse.org/t/cannot-upload-a-file-through-the-api-with-the-synchronous-parameter/43799)._
