Media: upload images to specified folder directly within document view
For images we use Improved media picker, so upload from within a document view is a breeze. However we would like to go one step further and like to choose what media folder the images should be stored under by default (or locked to). Like set a start folder for the upload-control. Is that possible?
In 4.5x we have the nice media picker with upload (as a datatype). I
would love to extend that one to choose a default (but user changeable)
media folder for the upload. But I'm bit stuck on how to begin with that
endeavour.
I only have minimum experience creating my own
datatypes. And since the media picker is quite a complex one (and even
more complexity when one adds cropping), I see some problems if I was to
create an adjusted one. What do you think - should I give it a try, or
is there an easier path to follow?
Another approach might be adding some javascript hack upon the
umbraco ui for it to choose that default folder. Then I would not need
to recreate anything else, just relying on the core datatype
functionality.
I think it's possible :). You could update the current media picker and give it an extra prevalue where you select the save folder, but if you do this you should also update the upload datatype (which is used for creating images in the media section).
If you want to create a custom datatype a good place to start is looking at the sourcecode of uComponents.
I'm also working on an advanced media picker. Might include this as a feature ;).
But can I update the built in media picker without rewriting the whole thing, since it is in the core I'm thinking it's not so easy to extract to a custom datatype?
I don't think you can update it without rewritting it. You could update the source code to support it, but that could cause problems with upgrading to a newer versions (Umbraco 4.5.3 or 4.6) in the feature. Creating a custom datatype based on the current mediapicker is probably the best solution at the moment. That's also what I'm doing right now with my new media picker.
Ah, and I just found out you already did a that YA media picker, a very good one. Perhaps I'd better wait a while then... And put that effort of mine in other areas of Umbraco community collaboration instead, I promise not to be lazy :)
Jonas
(I was in 's-Hertogenbosch once, whats up with those cool/crazy white sphere-houses?)
Media: upload images to specified folder directly within document view
For images we use Improved media picker, so upload from within a document view is a breeze. However we would like to go one step further and like to choose what media folder the images should be stored under by default (or locked to). Like set a start folder for the upload-control. Is that possible?
Regards / Jonas
I try again :)
In 4.5x we have the nice media picker with upload (as a datatype). I would love to extend that one to choose a default (but user changeable) media folder for the upload. But I'm bit stuck on how to begin with that endeavour.
I only have minimum experience creating my own datatypes. And since the media picker is quite a complex one (and even more complexity when one adds cropping), I see some problems if I was to create an adjusted one. What do you think - should I give it a try, or is there an easier path to follow?
Another approach might be adding some javascript hack upon the umbraco ui for it to choose that default folder. Then I would not need to recreate anything else, just relying on the core datatype functionality.
Thanks
Jonas
I think it's possible :). You could update the current media picker and give it an extra prevalue where you select the save folder, but if you do this you should also update the upload datatype (which is used for creating images in the media section).
If you want to create a custom datatype a good place to start is looking at the sourcecode of uComponents.
I'm also working on an advanced media picker. Might include this as a feature ;).
Jeroen
Thanks Jeroen, nice to hear.
But can I update the built in media picker without rewriting the whole thing, since it is in the core I'm thinking it's not so easy to extract to a custom datatype?
Cheers
Jonas
I don't think you can update it without rewritting it. You could update the source code to support it, but that could cause problems with upgrading to a newer versions (Umbraco 4.5.3 or 4.6) in the feature. Creating a custom datatype based on the current mediapicker is probably the best solution at the moment. That's also what I'm doing right now with my new media picker.
Jeroen
Ah, and I just found out you already did a that YA media picker, a very good one. Perhaps I'd better wait a while then... And put that effort of mine in other areas of Umbraco community collaboration instead, I promise not to be lazy :)
Jonas
(I was in 's-Hertogenbosch once, whats up with those cool/crazy white sphere-houses?)
Thanks again for answering this. I will have a look at the uComponents soruce, great project.
is working on a reply...