need to know how to upload the file , the file is of any type . Also need to know the file should be of formdata or JSON type format
var fs = require('fs');
var path = "../mnt/sm00471322/ATT/ANT-CC/APR/Intake/Repository/";
Intake.prototype.uploadFileToRepository = function(file , callback){
fs.writeFile(path + file , 'binary', function(error){
if (error) {
console.log("write error: " + error.message);
} else {
console.log("Successful Write to ");
}
});
};
Source: AngularJS
from Angular Questions https://angularquestions.com/2017/10/04/pronghorn-server-file-upload-node/
via @lzomedia #developer #freelance #web #lzomedia.com
No comments:
Post a Comment