Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discuss: Sulu Media as Base64 Output. #15

Open
TheCadien opened this issue Feb 26, 2020 · 2 comments
Open

Discuss: Sulu Media as Base64 Output. #15

TheCadien opened this issue Feb 26, 2020 · 2 comments
Labels
Feature New functionality not yet included in the Bundle To Discuss The core team has to decide if this will be implemented

Comments

@TheCadien
Copy link
Member

An feature I would like to discuss, is the output of Media in the Sulu Headless Bundle.

We use an own Headless Bundle for Sulu to provide 2 Systems with Content and Media from Sulu and our CMS Server isnt Public.
So we build an Service to get Media Content as Base64 string.

I think such an service or an optional way to use such an service ,make sence in these bundle too.
What did you think about it ?

@wachterjohannes
Copy link
Member

@TheCadien it would make sense to implement this - but the problem i see is when you use a remote storage (or locally really large files) to store your original files. This leads to an increased network traffic compared with downloading the image directly from the storage via the give URL of the media (independent from the storage a local url or a remote s3 one for example).

We also thought about an api to provide the Media data over an json api (without the content). The Response of this API would contain a full URL to download the content of the image directly.

I think this would be a good trade-off between a simple to use solution and prevent unnecessarily high network traffic.

// cc @nnatter @alexander-schranz

@wachterjohannes wachterjohannes added Feature New functionality not yet included in the Bundle To Discuss The core team has to decide if this will be implemented labels Feb 27, 2020
@alexander-schranz
Copy link
Member

I think its a very heavy process for the api also when we implement this we need to provide the original file as base64 and image formats as base64.

We definitly can not add this to the response of the media selection or single media selection as this would always trigger this heavy process.

So it would be again an own endpoint but then I don't understand its advantage to the exist download and image formats endpoint as converting the file content to base64 can be done also on the client side if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality not yet included in the Bundle To Discuss The core team has to decide if this will be implemented
Projects
None yet
Development

No branches or pull requests

3 participants