# API upload via url inconsistent results

**URL:** <https://meta.discourse.org/t/api-upload-via-url-inconsistent-results/84016>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [28.Март.2018 04:46:16 UTC](https://meta.discourse.org/t/api-upload-via-url-inconsistent-results/84016 "2018-03-28T04:46:16Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![michael.smith](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michael.smith/32/93123_2.png) [@michael.smith](https://meta.discourse.org/u/michael.smith)\
**Post date:** [28.Март.2018 04:46:16 UTC](https://meta.discourse.org/t/api-upload-via-url-inconsistent-results/84016/1 "2018-03-28T04:46:16Z")

</div>

Hi All,

Looking for some insight into this one.  
I am trying to get uploads to work via API and I keep getting the error

```
{"errors"=>["Sorry, you must provide a file to upload."]}

```

This happens when I try to upload a generated public url from canvas i.e.

```
https://instructure-uploads-apse2.s3.ap-southeast-2.amazonaws.com/account_24310000000000001/attachments/777/IT%20Helpdesk%20Support%20Duty%20Statement%205%20Nov%202015.pdf?response-content-disposition=inline%3B%20filename%3D%22IT%20Helpdesk%20Support%20Duty%20Statement%205%20Nov%202015.pdf%22%3B%20filename%2A%3DUTF-8%27%27IT%2520Helpdesk%2520Support%2520Duty%2520Statement%25205%2520Nov%25202015.pdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZAVS3WMRR54DT4Q%2F20180328%2Fap-southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20180328T032334Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=d4407ec41af0ffbf0bff523dba1322a18b726939242383876ed92ab1798977ee

```

If I use another url i.e.

```
http://unec.edu.az/application/uploads/2014/12/pdf-sample.pdf

```

it seems to work.

I can definitely browse to the url via browser and display the pdf file.  
What am I doing wrong here?

Thanks  
Michael

---

_[View the full topic](https://meta.discourse.org/t/api-upload-via-url-inconsistent-results/84016)._
