I want to
- Download a image file, then
- Upload the image file to Google Drive
var async = require('async');
var fileToUpload = require('./FileToUpload.js');
var fu;
async.waterfall([
function (callback) {
/*** At first, download image file ***/
fu = new fileToUpload.FileToUpload('http://ift.tt/1Cnna84');
callback(null, fu);
},
function (arg, callback) {
/*** Secondary, upload the image file to Google Drive ***/
arg.uploadToGoogleDrive();
callback(null, 'done');
}
]);
- There is no error, and
- the response from Google is that the file upload succeeded.
- In Google Drive, there is the new file
- but the data is broken so that I can't open the image.
In addition, download and upload separately, there is no problem. I can open the uploaded image in Google Drive.
Aucun commentaire:
Enregistrer un commentaire