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

Cropped Image name will be configurable. #12

Closed
mahendra-virtueinfo opened this issue Aug 6, 2014 · 2 comments
Closed

Cropped Image name will be configurable. #12

mahendra-virtueinfo opened this issue Aug 6, 2014 · 2 comments

Comments

@mahendra-virtueinfo
Copy link

Cropped image name will be configurable, it make big effort when some dynamics image directory generate after upload and cropped.

For Ex:
     if(isset($config['cropConfig']['useFileNameUnique']) && $config['cropConfig']['useFileNameUnique'] != ""){
        $ext = pathinfo($imageName, PATHINFO_EXTENSION);
        $imageName = sha1(uniqid(mt_rand(), true)).'.'.$ext;
     }

What you think about this one ?

@comur
Copy link
Owner

comur commented Aug 22, 2014

If you want to keep original file name, you have also to check if file already exists and if yes, you have to add some new chars to not replace existing one.

@mahendra-virtueinfo
Copy link
Author

Thank you

@comur comur closed this as completed Nov 19, 2014
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

2 participants