Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1506

Joomla! 5.x Coding • How to enqueue success message from media action plugin

$
0
0
Hi!

I created a media action plugin, that sends images on upload to an API and then fetches the optimized version and saves that instead. So far, everything works perfectly, there is just one little thing, I would really like and have no idea how to accomplish...
Screenshot_2.png
Joomla eventually displays the success message "Item uploaded." I would like to add an additional message to that about saved Filesize (e.g. "XY saved 24.73KB") or possibly error messages, if e.g. the API key is entered incorrectly.

How would I do that?

I would have thought, that

Code:

$this->app->enqueueMessage
should do the trick and I can see in the response object, that the messages are actually there, e.g.
Screenshot_3.png
...but they're never displayed.

Any help on that would be greatly appreciated! Thank you very much :)

Statistics: Posted by pAnd0rA — Thu Jun 06, 2024 9:24 am



Viewing all articles
Browse latest Browse all 1506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>