What I do is upload file to bucket, and make public link.
it work fine when I run my local nodejs host, upload succesed, make public link and able to download, however when I deploy to my nodejs hosting (Leancloud, something like Heroku) the error message was showed.
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
</Error>
I am sure that the json file is in the root of the folder, and the "storage" is set.
var storage = gcloud.storage({
keyFilename:
projectId:
});
it works fine in local nodejs host http://localhost:3000/#/upload but not http://mywebsite/#/upload
and formidable is used to do the file handling
What I do is upload file to bucket, and make public link.
it work fine when I run my local nodejs host, upload succesed, make public link and able to download, however when I deploy to my nodejs hosting (Leancloud, something like Heroku) the error message was showed.
I am sure that the json file is in the root of the folder, and the "storage" is set.
it works fine in local nodejs host
http://localhost:3000/#/uploadbut nothttp://mywebsite/#/uploadand formidable is used to do the file handling