From ddc7ef45fc04709772c8304c623a2213e40324fa Mon Sep 17 00:00:00 2001 From: Daniel Freytag Date: Wed, 5 Aug 2020 14:10:55 +0200 Subject: [PATCH] ignoring http(s) deletions --- package.json | 2 +- src/delete.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0460835..a7929a4 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/delete.js b/src/delete.js index 85c8c09..552b9a2 100644 --- a/src/delete.js +++ b/src/delete.js @@ -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 {