diff --git a/plugins/cloud/.vscode/settings.json b/plugins/cloud/.vscode/settings.json index 77ccdbd6db..a620593fa1 100644 --- a/plugins/cloud/.vscode/settings.json +++ b/plugins/cloud/.vscode/settings.json @@ -1,4 +1,4 @@ { - "scrypted.debugHost": "127.0.0.1", + "scrypted.debugHost": "scrypted-nvr", } \ No newline at end of file diff --git a/plugins/cloud/package-lock.json b/plugins/cloud/package-lock.json index 86d205417f..625307ecb0 100644 --- a/plugins/cloud/package-lock.json +++ b/plugins/cloud/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/cloud", - "version": "0.2.34", + "version": "0.2.35", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@scrypted/cloud", - "version": "0.2.34", + "version": "0.2.35", "dependencies": { "@eneris/push-receiver": "^4.1.6", "@scrypted/common": "file:../../common", diff --git a/plugins/cloud/package.json b/plugins/cloud/package.json index 79783f8a59..b0c5e9b0d4 100644 --- a/plugins/cloud/package.json +++ b/plugins/cloud/package.json @@ -53,5 +53,5 @@ "@types/node": "^22.1.0", "ts-node": "^10.9.2" }, - "version": "0.2.34" + "version": "0.2.35" } diff --git a/plugins/cloud/src/main.ts b/plugins/cloud/src/main.ts index aec87b0e79..1c5d355a3b 100644 --- a/plugins/cloud/src/main.ts +++ b/plugins/cloud/src/main.ts @@ -729,10 +729,10 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings, } async convertMedia(data: string | Buffer | any, fromMimeType: string, toMimeType: string, options?: MediaObjectOptions): Promise { - if (toMimeType !== ScryptedMimeTypes.Url) + if (!toMimeType.startsWith(ScryptedMimeTypes.Url)) throw new Error('unsupported cloud url conversion'); - if (fromMimeType === ScryptedMimeTypes.LocalUrl) { + if (fromMimeType.startsWith(ScryptedMimeTypes.LocalUrl)) { // if cloudflare is enabled and the plugin isn't set up as a custom domain, try to use the cloudflare url for // short lived urls. if (this.cloudflareTunnel && this.storageSettings.values.forwardingMode !== 'Custom Domain') { @@ -746,7 +746,7 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings, } return this.whitelist(data.toString(), 10 * 365 * 24 * 60 * 60 * 1000, `https://${this.getHostname()}`); } - else if (fromMimeType === ScryptedMimeTypes.PushEndpoint) { + else if (fromMimeType.startsWith(ScryptedMimeTypes.PushEndpoint)) { const validDomain = this.getSSLHostname(); if (validDomain) return Buffer.from(`https://${validDomain}${await this.getCloudMessagePath()}/${data}`);