Skip to content

Commit

Permalink
use response provider value for strapi image url upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ovieokeh committed Feb 28, 2023
1 parent 91cfea0 commit 0b6dd6d
Showing 1 changed file with 3 additions and 6 deletions.
Expand Up @@ -140,12 +140,9 @@ class Adapter {
}

const { backendUrl, responsive } = this.options || {};
const { name, url, alternativeText, formats } = response[0];

// If using a cloud provider, url will be a full URL.
const defaultUrl = url.includes("https")
? response[0].url
: backendUrl + response[0].url;
const { name, url, alternativeText, formats, provider } = response[0];
const defaultUrl =
provider !== "local" ? response[0].url : backendUrl + response[0].url;

if (formats && responsive) {
let urls = { default: defaultUrl };
Expand Down

0 comments on commit 0b6dd6d

Please sign in to comment.