We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
createReadStream
1 parent 079a8ce commit 9a7dd4fCopy full SHA for 9a7dd4f
lib/storage/drivers/gcs.ts
@@ -32,7 +32,9 @@ export const GCSStorageDriver = {
32
await deleteMany(cacheFileNames.map((fileName) => `${BASE_FOLDER}/${fileName}`))
33
},
34
async createReadStream(cacheFileName: string) {
35
- return bucket.file(`${BASE_FOLDER}/${cacheFileName}`).createReadStream()
+ const file = bucket.file(`${BASE_FOLDER}/${cacheFileName}`)
36
+ if (!(await file.exists().then((res) => res[0]))) return null
37
+ return file.createReadStream()
38
39
40
async createDownloadUrl(cacheFileName: string) {
0 commit comments