Should be possible to set resumable upload dir from config. Currently fails with node10 cloud function as only /tmp is writable
@google-cloud/storage version: 3.0.3options.resumable to falseMaking sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
You should be able to set an option, configPath, which will override where that file gets written to. Can you give that a shot and let me know how it goes?
Issue is related to gcs-resumable https://github.com/googleapis/gcs-resumable-upload/issues/259
This issue has been resolve upstream in gcs-resumable-upload. New installations of @google-cloud/storage will pick this up. Let us know if there are still any issues!
Hi, just to let you know that I have this issue using @google-cloud/storage 4.0.0 and google cloud functions nodejs version 8.
Upload works if upload from /tmp/big_file has options: {resumable: false} but not with options: {resumable: true}.
My full options list is:
let options = {resumable: false, metadata: {gzip: true, cacheControl: "public, max-age=31536000"}};
@SinanGabel you should set an option, configPath that points to a writable directory:
let options = {
configPath: '/path/to/writable/directory',
metadata: {
gzip: true,
cacheControl: "public, max-age=31536000"
}
};
It appears this issue still exists. I am seeing the same issue with:
@google-cloud/storage: 4.3.0node: 10Adding resumable: false to my config did fix the problem.
I have same issue
@stephenplusplus why can't it write to /tmp? as I'm able to write my file to /tmp, I don't know other writeable directory on cloud function.
According to cloud function /tmp is the only writeable directory https://cloud.google.com/functions/docs/concepts/exec#file_system
I'm also having this problem. What other directory than /temp can be set in configPath?
I'm having this issue with 4.7.0 also. The error im getting is
ResumableUploadError: A resumable upload could not be performed. The directory, /root/.config,
is not writable. You may try another upload, this time setting `options.resumable` to `false`.
I am able to write files to this location when I download them
Yeah, I'm having this issue all the time as well.
I am facing this issue.
I'm having this issue as well. Tried the configPath option with /tmp but that didn't help. The only way I can find to get my uploads to not fail is to set resumable = false. @stephenplusplus
Could you create a new issue with code and full environment and error details? Thanks!
Setting the configPath works, but you need to make sure that it points to a file, not a directory.
This works for me.
const options = {
configPath: `${writableDirectory}/.config`,
resumable: true
}
Setting the
configPathworks, but you need to make sure that it points to a file, not a directory.
This works for me.const options = { configPath: `${writableDirectory}/.config`, resumable: true }
Please send me details. I have some error to change the path
Most helpful comment
It appears this issue still exists. I am seeing the same issue with:
@google-cloud/storage: 4.3.0node: 10Adding
resumable: falseto my config did fix the problem.