@rytass/storages-adapter-gcs 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +1 -1
- package/package.json +2 -2
- package/storages-adapter-gcs.js +1 -1
package/index.cjs.js
CHANGED
|
@@ -16,7 +16,7 @@ class StorageGCSService extends storages.Storage {
|
|
|
16
16
|
});
|
|
17
17
|
this.bucket = this.storage.bucket(options.bucket);
|
|
18
18
|
}
|
|
19
|
-
async url(key, expires = 1000 * 60 * 60 * 24) {
|
|
19
|
+
async url(key, expires = Date.now() + 1000 * 60 * 60 * 24) {
|
|
20
20
|
const file = this.bucket.file(key);
|
|
21
21
|
const [url] = await file.getSignedUrl({
|
|
22
22
|
action: 'read',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rytass/storages-adapter-gcs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Google Cloud Storage Adapter for @rytass/storages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gcp",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@google-cloud/storage": "^6.5.3",
|
|
25
|
-
"@rytass/storages": "^0.1.
|
|
25
|
+
"@rytass/storages": "^0.1.4",
|
|
26
26
|
"uuid": "^8.3.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
package/storages-adapter-gcs.js
CHANGED
|
@@ -12,7 +12,7 @@ class StorageGCSService extends Storage {
|
|
|
12
12
|
});
|
|
13
13
|
this.bucket = this.storage.bucket(options.bucket);
|
|
14
14
|
}
|
|
15
|
-
async url(key, expires = 1000 * 60 * 60 * 24) {
|
|
15
|
+
async url(key, expires = Date.now() + 1000 * 60 * 60 * 24) {
|
|
16
16
|
const file = this.bucket.file(key);
|
|
17
17
|
const [url] = await file.getSignedUrl({
|
|
18
18
|
action: 'read',
|