Implement a structure attribute for field media’s
Closed this issue · 6 comments
Steps to reproduce the issue
This was my proposal on the previous media manager and I think is still valid for this one as well.
A simple attribute named structure that dictates the way images are saved (this affects only local adapter).
Eg
Structure”y/m/d”
Should dictate that the file uploaded will end up in images/2018/3/22/myfile.jpg.
This can also be extended for the value $username
In fact this is just a core implementation of JCE’s most wanted feature.
This flexibility will be a nice feature that ensures media manager will be used by 3rd PD
Expected result
Actual result
System information (as much as possible)
Additional comments
As a long time advocate of JCE (I presented at multiple joomladays on it) I didnt find it was actually that popular. It was mainly only "requested" by people coming from wordpress because that is what they were used to. It's not the default in JCE, its just one of the many options including /$user/image . while it is useful for a blog type site, where you are uploading new images for each post, its not useful at all for a corporate site which re-uses corporate assets.
Where is this attribute defined? In the form XML?
while it is useful for a blog type site, where you are uploading new images for each post, its not useful at all for a corporate site which re-uses corporate assets.
Not sure that I will agree with you on this one. Let me give you an example how this can be the greatest lifesaver both for devs and foremost for Joomla users. Let's assume we have an e-commerce based site. The process for the images (for the end user) is to create folders that somehow represent the structure Company/Model/files....
With my proposal this will be handled automatically (dev needs to inject the current Company and Model, or whatever makes sense for the use case). So at the end we provide some useful API for devs and foremost we potentially remove a lot of struggles from the section "managing static assets"
@laoneo yep, is the field type="media" the one I'm referring to here
I assume that. What I'v asked is where the definition is done? Because I think the end user wants to make the decision if the images should be stored in a sub folder or normally. So the only use case I see is to add an option in the custom field because how should a developer know if all the users of his extension do want to store the images in a sub folder or normally?
how should a developer know if all the users of his extension do want to store the images in a sub folder or normally
I guess all developers make some decisions on behalf of their users. I mean this is what we essentially do in J4 right now... The only difference is that J4 is all about the internals and this is about UX. Apple removed totally the filesystem form IOS (for the end users) and a few billions are happy with that 😃