I am writing an image file to seaweedfs but it is throwing an err
SyntaxError: Unexpected end of input
below is the code
var seaweedfs = new weedClient({
server: "localhost",
port: 8080
});
seaweedfs.write('C:/images/image.png').then(function(fileInfo) {
//return seaweedfs.read(fileInfo.fid);
console.log(fileInfo.fileUrl);
}).catch(function(err) {
//error handling
console.log(err);
});
What I am doing wrong in the above code.
I have resolved this issue. I was giving the wrong port number while initializing weedClient. When I run the weed server it shows port 9333 on the console. Just replaced 9333 instead of 8080 and it worked.