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

keep image's initial name #15

Open
davo3 opened this issue Jul 3, 2013 · 2 comments
Open

keep image's initial name #15

davo3 opened this issue Jul 3, 2013 · 2 comments

Comments

@davo3
Copy link

davo3 commented Jul 3, 2013

Thanks for the component !!

I was wondering if there is a way to save the initial image's name, and in case if it already exists - add some number after it. I think it would be better, rather than having an image name like this
51d3f648-fb08-404b-81c3-13c06ce302c7.jpg

Thanks!!

@tute
Copy link
Owner

tute commented Jul 3, 2013

Hi! I'm not developing this anymore (lost track of CakePHP versions and changes), but you should be able to tap on that functionality here: https://github.com/tute/Thumbnail-component-for-CakePHP/blob/master/attachment.php#L93

Could be a boolean option: mask original file names or not.

Thanks for the feedback!

@jalpertti
Copy link

Sorry to bother you with my question, but this is bugging my mind…

Is there any way to use your thumbnail component from other mode than the calling model? For example in the example application PET –model is using the component and the data is saved to that model.

I have a situation, where my model that uses component is called IMAGE and I would like to save images from COLLABORATION –model. This is because when I save collaboration messages, I would like to save image (and it’s different versions) as well in the same controller. I seem not to find the right format of the code to save data, Cake always says “Undefined index: collaboration” when I call it this way:

$this->Attachment->upload($this->request->data['Collaboration']);

Also calling this way won’t work (naturally):

$this->Attachment->upload($this->request->data['Image']);

Is there any discussions around this or blog that I could ask these questions from community?

Thanks,

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