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

how to use meioupload to create more thumbnails from existing images inside webroot/img folder? #45

Open
simkimsia opened this issue May 16, 2010 · 10 comments

Comments

@simkimsia
Copy link
Contributor

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.

@simkimsia
Copy link
Contributor Author

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.

@jrbasso
Copy link
Owner

jrbasso commented May 17, 2010

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?

@simkimsia
Copy link
Contributor Author

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.

@jrbasso
Copy link
Owner

jrbasso commented May 17, 2010

It's not possible with actual version. I will analise this to implements in 3.0. Thanks.

@simkimsia
Copy link
Contributor Author

okie thanks jrbasso. i cannot wait to have it. i really love the meioupload you have done so far.

@simkimsia
Copy link
Contributor Author

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.

@jrbasso
Copy link
Owner

jrbasso commented May 18, 2010

Very nice plugin. When I have time, I will merge it with MeioUpload (if you allow, of course). Open source is fantastic. :)

@simkimsia
Copy link
Contributor Author

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. :)

@ceeram
Copy link

ceeram commented Aug 4, 2010

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),
),

@simkimsia
Copy link
Contributor Author

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. :)

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

No branches or pull requests

3 participants