I am having an issue getting this to work on the machine I use for development. It works great in the production environment hosted at Media Temple, but not so much on my laptop. I am doing my development on a Windows machine using XAMPP for Apache PHP and MySQL. The error I am getting is the following:
Image – There was a problem uploading ‘AquaBlue.jpg’.
“Image” is the name of my field. “AquaBlue.jpg” is the name of the image I am trying to upload.
I have been racking my brain all day trying to figure this out. Here are some things I have tried:
Does anyone have any thoughts here?
2. If I turn on file rename, then upload 2 or 3 images, only the last image gets uploaded by 3 times!
This issue was driving me crazy so I decided to dig deep down into the extension and was able to fix this issue. The extension is generating a random filename using a MD5 hash based on the date down to the second and I think the server processes it so fast that multiple files end up getting the same name. So I ended up prepending the date with the filename. I am using version 3.1.1 of the extension.
Change the following
$file_names[$file_key] = $this->_code().$file['ext'];
to
$file_names[$file_key] = $this->_code($file_name).$file['ext'];
And…
function _code()
{
return md5(date('U'));
}
should be changed to
function _code( $file_name )
{
$myhash = $file_name.(date('U'));
return md5($myhash);
}
Hope that this helps others!
2. If I turn on file rename, then upload 2 or 3 images, only the last image gets uploaded by 3 times!This issue was driving me crazy so I decided to dig deep down into the extension and was able to fix this issue. The extension is generating a random filename using a MD5 hash based on the date down to the second and I think the server processes it so fast that multiple files end up getting the same name. So I ended up prepending the date with the filename. I am using version 3.1.1 of the extension. Change the followingto$file_names[$file_key] = $this->_code().$file['ext'];
And…$file_names[$file_key] = $this->_code($file_name).$file['ext'];
should be changed tofunction _code() { return md5(date('U')); }
Hope that this helps others!function _code( $file_name ) { $myhash = $file_name.(date('U')); return md5($myhash); }
That’s awesome! I’ll change my extension to this straight away.
Guys, somebody “married” this extension with SAEF?
Are you asking if anyone has done so?
I had the old version married with no problems, but upgrading to 1.6.2 and 3.1.1 I can’t get it working. I wrote a blog post on this very thing a while ago. note that it was for v2 of the extension not v3.
Sorry if this has been covered already, and I suspect the answer is ‘no’, but… Is there any conceivable way that it would be possible to add extra metadata for each file upload? The reason why is that I’d like to add a specific alt attribute value for each image. Also, I’m incorporating this with the Lightbox technique which requires a title attribute to create a caption for each image. As I say, I suspect there’s no feasible way of doing this, beyond going back to having multiple fixed custom text input fields (img1, img1_caption, img2, img2_caption, etc) Thanks, Dave
Just wondering if anyone has worked out a solution for ading unique captions to images upload via File?
I’m already using multi text (with 3 columns) for another field so I can’t use MultiText for that either…..
Any ideas?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.