Get Upload URL

A Note:

Take note of the fileName property of the data object, this will be supplied as uploaded_filename when resolving the dispute. The signedUrl is used for uploading an attachment i.e

var request = require("request");
var fs = require("fs");                      

fs.readFile('./dispute_attachment.pdf', function(err, data) {
    var options = {
     method : "PUT",
     url : signedUrl,
     'Content-Type': mime_type_of_file_being_uploaded, //for a list of mime types, please see here (
     body: data
   request(options, function (error, response, body) {
        if (error) throw new Error(error);
        console.log(`status code: ${response.statusCode}`);

Note: Usually, this returns an empty string for a successful PUT upload, so it will be a good idea to see the status code returned. The signedUrl expires 30 minutes after creation.

Click Try It! to start a request and see the response here!