3-binary-data: Cannot upload image
sravanrekandar opened this issue · 4 comments
If I enter just form data, it is working fine. But if I try to upload image, The action is simple redirecting to 'NOT Found'.
The problem is coming i here:
// File: lib/images.js
stream.on('error', (err) => {
req.file.cloudStorageError = err;
next(err);
});
And the error is not clear: { errors: [ { domain: 'global', reason: 'notFound', message: 'Not Found' } ],
code: 404,
message: 'Not Found',
response: 'Not Found' }
I updated the repo with the changes. I found the below was the only change in the new commit. But the change didn't help to make it work
lib/images.js
stream.on('finish', () => {
req.file.cloudStorageObject = gcsname;
req.file.cloudStoragePublicUrl = getPublicUrl(gcsname);
next();
});
+1 Same Problem
Environment:
Node v7.3.0
Npm v3.10.10
SO Windows7
Module Version:
google-cloud/datastore@1.0.1
I had this same issue. Here's what fixed it for me:
In config.json I changed:
"CLOUD_BUCKET": "mybucketname"
to:
"CLOUD_BUCKET": "mybucketname.appspot.com"
Thanks for raising the issue. I can't reproduce it, assuming the sources got updated in the meantime.