Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zladuric/39fb3f4d9b81a97432e6464de20a6935 to your computer and use it in GitHub Desktop.
Save zladuric/39fb3f4d9b81a97432e6464de20a6935 to your computer and use it in GitHub Desktop.
it('should upload a file', function() {
const request = require('request');
const headers = {
'Accept': '*/*',
'Origin': 'http://localhost:5555',
'x-amz-acl': 'public-read',
'Content-Type': 'video/quicktime',
};
const options = {
headers,
method: 'PUT',
url,
body: fs.readFileSync('./video.mp4'),
};
request(options, function (err, res) {
if (err) {
return done(err);
}
res.statusCode.should.equal(200);
done();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment