Skip to content

Commit

Permalink
ignoring http(s) deletions
Browse files Browse the repository at this point in the history
  • Loading branch information
frytg committed Aug 5, 2020
1 parent 86c6dcc commit ddc7ef4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swrlab/node-storage-wrapper",
"version": "0.0.9",
"version": "0.0.10",
"description": "Wrapping AWS S3, GCP GCS, file storage",
"main": "./src/index.js",
"engines": {
Expand Down
9 changes: 9 additions & 0 deletions src/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ module.exports = async function (uri) {
// delete from gcp
await this.sdk.gs.bucket(bucket).file(path).delete(path);

// return ok
return Promise.resolve();
} else if (
uri.substr(0, 7).toLowerCase() == 'http://' ||
uri.substr(0, 8).toLowerCase() == 'https://'
) {
// log progress
this.sdk.log(this, 'log', ['storage.delete.https (not possible) >', uri]);

// return ok
return Promise.resolve();
} else {
Expand Down

0 comments on commit ddc7ef4

Please sign in to comment.