how to use meioupload to create more thumbnails from existing images inside webroot/img folder?
Opened this issue · 10 comments
Hi there,
i have no issues using meioupload, but how do i create more thumbnails from existing images inside webroot/img folder?
i already have a model that actsAs meioupload.
i prefer to reuse meioupload than use another plugin that also relies on the phpthumb since i also need to store image metadata inside the database.
thank you.
basically what i mean to say is that i want to duplicate an existing image in webroot/img/my_folder and create the thumbnails and placed the duplicate image inside uploads/some_foldername and the thumbs inside uploads/some_foldername/thumbs and also to update the datatable whose model actsAs MeioUpload. sorry i have to clarify since english is not my first language.
You can use the thumbsizes option on the actsAs. You can see in the 3.0 branch about this. Look http://github.com/jrbasso/MeioUpload/tree/3.0
This resolve your problem?
Hi I have downloaded the 3.0 code. however i think i must have been unclear. i do NOT wish to UPLOAD a new file.
i wish to duplicate EXISTING image file in webroot/img and then subsequently create the thumbnails and data records in the database.
i already have a model that actsAs MeioUpload.
My model already is successfully allowing me to a) upload a image from webpage, b) create thumbnails and c) add in data correctly in datatable.
How can i use that model and
a) duplicate an existing file eg, from webroot/img/someimage.jpg or from webroot/uploads/someotherimage.png
b) create the thumbnails of the duplicate
c) generate data record for the duplicate?
Thank you.
It's not possible with actual version. I will analise this to implements in 3.0. Thanks.
okie thanks jrbasso. i cannot wait to have it. i really love the meioupload you have done so far.
Hi jrbasso, i really cannot wait to have it and yesterday i just had to do my own version of what i needed on top of your current 2.1 MeioUpload plugin. My cakeapp needs such a function.
Hope you are not offended.
I am not really a techie and this is my first try writing a plugin and uploading to github. Even my first time using git.
Feel free to close this issue. Once you have added in the functions for duplicate inside MeioUpload and it works in my cakeapp, i will gladly close down the MeioDuplicate and use yours. :)
http://github.com/keisimone/MeioDuplicate
Thank you.
Very nice plugin. When I have time, I will merge it with MeioUpload (if you allow, of course). Open source is fantastic. :)
hi jrbasso,
of course go ahead and merge. :)
the code would look very familiar to you. basically 90% of it is the same as code already existing in MeioUpload, just that i changed the function names abit.
The only thing that is probably more original is the test case. Nothing more.
I dont think i did a very good job but of course i am quite happy to actually do this for the first time in my life. it is very cool. :)
im using 2.0 version and i can set multiple thumbs like this:
'thumbsizes' => array(
'admin' => array('width'=>60, 'height'=>60),
'default' => array('width'=>100, 'height'=>100),
),
apologies for my unclear question in issue title. what i meant was duplicate an existing image elsewhere in the img folder. see this for more clarification http://github.com/jrbasso/MeioUpload/issues#issue/45/comment/242777
thanks for commenting though ceeram. :)