Thursday, 5 September 2013

Issue Reagrding Uplaoding Image

Issue Reagrding Uplaoding Image

I am using Joomla and created Image Gallery for K2 Component. I want to
upload image into my gallery, and used for away from garbage name i used
$fileName = preg_replace('/[^\w\._]+/', '_', $fileName); by this i can
upload images with "- (dash)"in them but its creates problem while
uploading images with "whitespace" in them and gives error. JFile: :copy:
Cannot find or read file:
$/opt/lampp/htdocs/joomla_2.5/images/folkgallery/tmp/14 .jpg
when in remove that above code preg_match then i can upload images with
whitespace in them but not able to upload images with -(dash)in them. So
kindly provide some way that i can upload image with anytype of image name
it contains. Eagerly waiting for your replys...
Thanks in Advance.

No comments:

Post a Comment