Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

Ionic3 POST request for upload dropbox

$
0
0

@byeongsoek wrote:

Hi. I’m trying to upload a file to Dropbox using Dropbox Upload API.

But I’m wandering.

Below is my code.

  uploadFile() {
    let headers = new Headers();
    let data = '123';

    this.testToken = <ACCESS-TOKEN>;

    headers.append('Authorization', 'Bearer ' + this.testToken);
    headers.append('Content-Type', 'application/octet-stream');
    headers.append('Dropbox-API-Arg', '{"path":"/0.txt"}');
    return this.http.post('https://content.dropboxapi.com/2/files/upload', data, { headers: headers });
  }

what do I doing wrong? Please guide me.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>