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

[Image Editor] Implement backend endpoints for MiniPaint #638

Closed
ValeriaMaltseva opened this issue Dec 11, 2024 · 5 comments · Fixed by #641
Closed

[Image Editor] Implement backend endpoints for MiniPaint #638

ValeriaMaltseva opened this issue Dec 11, 2024 · 5 comments · Fixed by #641
Assignees

Comments

@ValeriaMaltseva
Copy link

ValeriaMaltseva commented Dec 11, 2024

Currently, we have a fake implementation in the controller for the MiniPaint image editor. We need to replace these temporary actions with actual backend endpoints that will handle requests for working with images in the MiniPaint image editor.

Current implementation:

Need:

  1. Add the endpoint GET / image-editor (https://github.com/pimcore/studio-ui-bundle/pull/816/files#diff-d87357d60aee0b716fcf1bc05ece8afd5c8cfcc808294b1566df9df3b0b1b713R35)
  2. Add the endpoint GET / get-asset (https://github.com/pimcore/studio-ui-bundle/pull/816/files#diff-d87357d60aee0b716fcf1bc05ece8afd5c8cfcc808294b1566df9df3b0b1b713R55)
  3. Update the endpoint /pimcore-studio/api/assets/{id}/image/stream/custom by making the resizeMode parameter optional.
@markus-moser
Copy link

markus-moser commented Dec 11, 2024

I would say 1. should stay in the UI bundle as it is UI related and not an API topic.

But we need an endpoint to be able to save the edited image:

https://github.com/pimcore/studio-ui-bundle/pull/816/files#diff-7489a70b7ce17ad8af67f5e1a2093f625c14ba490f5951d2cb81b1d9e3af2f53R144

@lukmzig
Copy link
Contributor

lukmzig commented Dec 13, 2024

@ValeriaMaltseva @markus-moser

@markus-moser
Copy link

@lukmzig Thanks a lot, but regarding 2 - we would need a stream of the binary content of the asset not the json.

@ValeriaMaltseva
Copy link
Author

@lukmzig Thanks! 😊

@lukmzig
Copy link
Contributor

lukmzig commented Dec 16, 2024

@markus-moser @ValeriaMaltseva I added new endpoint now which returns the binary stream of the original asset based on the ID
https://github.com/pimcore/studio-backend-bundle/blob/1.x/src/Asset/Controller/Image/StreamController.php#L65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants