We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

File

Development and Programming

Matt Weinberg's avatar
Matt Weinberg
489 posts
16 years ago
Matt Weinberg's avatar Matt Weinberg

Do you have it set to automatically rename files on upload?

       
grantmx's avatar
grantmx
1,439 posts
16 years ago
grantmx's avatar grantmx

Hmmm…where might that be? Documentation aint’ exactly that through. Thanks!

       
grantmx's avatar
grantmx
1,439 posts
16 years ago
grantmx's avatar grantmx

Ah. Rewright file names…Yes. its enabled.

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
16 years ago
Matt Weinberg's avatar Matt Weinberg

What happens if you don’t do that, but make sure to use uniquely named files?

By the way, if you don’t have rewrite turned on, but upload a duplicate, it’ll ask you if it should just rename it for you next time.

       
grantmx's avatar
grantmx
1,439 posts
16 years ago
grantmx's avatar grantmx

Not sure, I’ll let you know. Sure, I do have uniquely named files.

Nope. Haven’t uploaded any duplicates.

       
fogcity's avatar
fogcity
260 posts
16 years ago
fogcity's avatar fogcity

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?

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
16 years ago
Matt Weinberg's avatar Matt Weinberg

Have you checked the path in the file upload settings?

       
Michael Roper's avatar
Michael Roper
36 posts
16 years ago
Michael Roper's avatar Michael Roper
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:
//$server_path = preg_match("/^\//", $server_path)==0?PATH.$server_path:$server_path;
//$server_path = '/'.preg_replace("/^\/|\/$/", '', $server_path).'/';
As I said, this solved the problem for me but it’s probably not the best fix - your mileage may vary!

as he says, YMMV, but it worked for me!

       
phatphug's avatar
phatphug
31 posts
16 years ago
phatphug's avatar phatphug
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:

  1. At line 403 of ext.mh_file_ext.php the code is:
$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”

  1. At line 896 of ext.mh_file_ext.php (the “Resize Images” section) the code is:
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.

       
SethG's avatar
SethG
29 posts
16 years ago
SethG's avatar SethG

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>
       
Matt Weinberg's avatar
Matt Weinberg
489 posts
16 years ago
Matt Weinberg's avatar Matt Weinberg

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.

       
SethG's avatar
SethG
29 posts
16 years ago
SethG's avatar SethG
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.

       
awsadmin's avatar
awsadmin
127 posts
16 years ago
awsadmin's avatar awsadmin

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!

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
16 years ago
Matt Weinberg's avatar Matt Weinberg

What are the images, upload_picture, and picture_caption fields? From that output it doesn’t seem like {images} is the name of a custom field.

       
fogcity's avatar
fogcity
260 posts
16 years ago
fogcity's avatar fogcity

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…

       
First 42 43 44 45 46 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.