I love the File extension!
But am seeing a strange problem – three forward slashes after my domain name?
An example URL returned (as {jpg_file} or {file_url}) by File when my template is parsed:
http:///www.mydomain,com/images/file.jpg
Note the three slashes at the beginning.
Only seems to happen when I allow multiple file upload.
Any clue?
I am having a problem with using the File Extension on Windows Server 2003. I’ve used the default Upload File function provided by Expression Engine and that works. However any time I use the File Extension’s File field, I get an error: Image – There was a problem uploading <name of file> … Any suggestions from anyone who has got this working on Windows Server 2003?
I’m having the same problem, is there any fix for this? I saw a post earlier in the thread that said something about a fix in the next release for something to do with IIS servers…
Edit: after more digging through this epic thread, i found this…
It seems that somewhere things were getting confused with the path to save the files to - it was giving a Unix style path with forward slashes in it. I have temporarily solved the problem by commenting lines 699 and 700 of ext.mh_file_ext.php so they look like this:As I said, this solved the problem for me but it’s probably not the best fix - your mileage may vary!//$server_path = preg_match("/^\//", $server_path)==0?PATH.$server_path:$server_path; //$server_path = '/'.preg_replace("/^\/|\/$/", '', $server_path).'/';
as he says, YMMV, but it worked for me!
I’m having an issue with File 3.1.1 and ExpressionEngine 1.6.3 where the “Resize Images” setting isn’t honored and resets itself to “Auto” every time I update/save the preferences at “CP Home > Admin > Section Administration > File Upload Preferences”. When this happens, the File extension generates a resized thumbnail for every image uploaded (due to the Auto resizing selected). I’d like to have the File extension honor my “Resize Images” setting of “None” so that I don’t needlessly have thumbnails generated (since I don’t need them for my specific application). The server is a RHEL 4 machine with Apache 2.0.52 and PHP Version 4.3.9. I’ve confirmed this behavior on two different installations of ExpressionEngine (on two separate servers). Is anyone else having the same problem or know of a resolution and/or work-a-round?
I just has this exact problem in File v3.1.1 too. After looking through the code I found two issues in ext.mh_file_ext.php:
$r.= '<option'.(($this->resize_images=='no')?' selected="selected"':'').' value="no">Do not resize</option>';
this should be changed to:
$r.= '<option'.(($this->resize_images===FALSE)?' selected="selected"':'').' value="no">Do not resize</option>';
The reason for this is that the _set_prefs() function resets any string parameters of ‘yes’/’no’ to TRUE/FALSE This happens on line 458-459.
$value = ($value === 'yes')?TRUE:$value;
$value = ($value === 'no')?FALSE:$value;
This fixes the problem of the file upload preferences page not displaying the correct value for the “Resize Images” field when it has previously been set to “Do not resize”
if($this->resize_images !== FALSE && $file_field['max_width'] != '' || $file_field['max_height'] != '')
this should be changed to:
if($this->resize_images !== FALSE && ($file_field['max_width'] != '' || $file_field['max_height'] != ''))
Brackets must enclose the or ( || ) section of this if statement, otherwise it will pass even when resize_images is set to FALSE.
Mark,
Though you have likely heard it a million times, this a great extension and I appreciate your efforts.
I am wondering if you have fielded the following request and/or I would be interested to know if there is a solution for or what would be involved with developing the following.
Would love capability to be able to add a Name/label to the file being uploaded and to be able to add that name to a template. The idea is I am associating a file or multiple files with an entry and would like to display them in a link with a more human and useful name rather than the fine name. For example to do:
<a href="http://{custom_field}">{name for file entered upon upload}</a>
Mark hasn’t participated in the thread in quite a while. I posted a slightly annoying work-around to this problem here: http://ellislab.com/forums/viewthread/38997/P342/#335189 (and notice Ryan’s suggestion 2 posts below it).
I’ve always thought it would be a great addition to the plugin, though.
Mark hasn’t participated in the thread in quite a while. I posted a slightly annoying work-around to this problem here: http://ellislab.com/forums/viewthread/38997/P342/#335189 (and notice Ryan’s suggestion 2 posts below it). I’ve always thought it would be a great addition to the plugin, though.
Thanks slapshotw, will check this out.
I need help with the tags. This is what I put:
{exp:weblog:entries weblog="photo_gallery"}
{images}
{upload_picture}
<----------file field
{picture_caption}
{/images}
{/exp:weblog:entries}
When I publish the page and view it I get this:
{images}
District Conference pictures {/images}
I don’t see the picture!
has anyone attempted to mod the File extension to allow multiple files to be selected from the pop-up dialog?
right now, when i want to upload multiple files to one blog entry, i need to click File… button, open a new dialog, click the file, click OK, then repeat for each file.
would be easier on the client if they could just open one file dialog and choose multiple files…
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.