Skip to main content
Participant
April 25, 2024

Not able to open image s3 url using Adobe Express Embed SDK

  • April 25, 2024
  • 0 replies
  • 114 views

Getting this error while trying to open a public image s3 url using Adobe Express Embed SDK:

GET https://s3.ap-south-1.amazonaws.com/claid.ai-bucket/klaid/output/2024-03-01_12-14-58_PM_2.jpg net::ERR_FAILED

image url: https://s3.ap-south-1.amazonaws.com/claid.ai-bucket/klaid/output/2024-03-01_12-14-58_PM_2.jpg

code to render this image:

 

 

const [base64Asset, setBase64Asset] = useState('');
const s3ImageUrl = 'https://s3.ap-south-1.amazonaws.com/claid.ai-bucket/klaid/output/2024-03-01_12-14-58_PM_2.jpg';
setBase64Asset(s3ImageUrl)

 const { editor } = await window.CCEverywhere.initialize(initializeParams, configParams);

          const appConfig = { callbacks: callbacks };
          const docConfig = {
              asset: {
                  data: base64Asset,
                  dataType: 'base64',
                  type: 'image',
              },
          };

          const exportOptions = [
              {
                  id: 'download',
                  label: 'Download',
                  action: {
                      target: 'download',
                  },
                  style: {
                      uiType: 'button',
                  },
              },
              {
                  id: 'save-modified-asset',
                  label: 'Save image',
                  action: {
                      target: 'publish',
                  },
                  style: {
                      uiType: 'button',
                  },
              },
          ];

          const exportConfig = exportOptions;
          editor.createWithAsset(docConfig, appConfig, exportConfig);