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

Iceberg Creative's avatar
Iceberg Creative
21 posts
16 years ago
Iceberg Creative's avatar Iceberg Creative

No matter what I try thumbnails are not created when I upload an image. When I use the regular ‘Upload File’ control on the regular weblog post form, I can use the popup to resize and create a thumbnail. But when using Mark’s extension my main image is uploaded ok, but the thumbnail never appears.

Any suggestions anyone. Does the select image toolkit matter?

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

Are you sure your settings are set to Keep Originals = Yes, you set max image height and width, and you put a setting for Resize Images?

       
stinhambo's avatar
stinhambo
1,268 posts
16 years ago
stinhambo's avatar stinhambo

I noticed the Owner and Group name for File uploads are different to my normal files.

Will cause any issues when it comes to migrating to a live server?

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

It depends on how your server is setup and how you’ll be doing the migration. You can always chown the files to the new server though.

Edit: Everyone can read the files anyway, so you won’t have a problem with people viewing the images.

       
stinhambo's avatar
stinhambo
1,268 posts
16 years ago
stinhambo's avatar stinhambo

Hey Slapshotw, are you Mark Huot in disguise?

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

No…just use this extension a lot, have looked through its code a lot, and try to help on the thread whenever possible in his absence.

       
stinhambo's avatar
stinhambo
1,268 posts
16 years ago
stinhambo's avatar stinhambo

Well it’s much appreciated mate 😊

       
Iceberg Creative's avatar
Iceberg Creative
21 posts
16 years ago
Iceberg Creative's avatar Iceberg Creative
Are you sure your settings are set to Keep Originals = Yes, you set max image height and width, and you put a setting for Resize Images?

My missing width and height were the problem. Many thanks.

       
shinka's avatar
shinka
138 posts
16 years ago
shinka's avatar shinka

Hope this hasn’t been covered before but I’m having a problem using the variable pair with other custom fields.

File field is ‘resources_file’.

{exp:weblog:entries weblog="resources"}
                <div class="resource">
                <h2>{title}</h2>
                {resources_description}
                {resources_file}{file_name}{/resources_file}
                [<a href="http://{title_permalink=template_name/resources}">Download File</a>] ({resources_filesize} - {resources_filetype})
                </div>
            {/exp:weblog:entries}

If I just use

{resources_file}

everything works fine, but when I try to just get the file_name rather than the full path using

{resources_file}{file_name}{/resources_file}

, the other custom fields (‘resources_filesize’ and ‘resources_filetype’) don’t work.

       
Paul Bell's avatar
Paul Bell
103 posts
16 years ago
Paul Bell's avatar Paul Bell

For anyone having problems using this with MSM, check out this post

The problem is most likely to come up if you duplicated a site that uses the extension.

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
16 years ago
Deron Sizemore's avatar Deron Sizemore

Hi,

I’m trying to get this extension to work and have been successful with new images, but cannot figure out what’s needed to make it play nice with already existing images.

I’m using a weblog as a gallery and all of my existing images have been uploaded the usual way inside of the EE publish page and I’ve selected “Insert URL” as the setting when uploading. To display the image I’m using:

{exp:imgsizer:size src="{gallery-image}" width="130" height="130" alt="{gallery-image-name} - {gallery-image-description}"}

When I go back in and look at the existing entries inside of my “gallery” weblog, it shows the correct file name for that “file” custom field but it has that same {filedir_X} appended to the beginning of the file name and I noticed that when uploading a new image it does not have the {filedir_X} appended to the front of the file name. I assume this is because you have to manually specify and upload destination for each file custom field so it already “knows” where the image is stored thus the extra URL info is not needed?

Thoughts on how to get my existing images to work?

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

Deron,

I’m confused on what you’re trying to do here. The file field can’t access already existing images as far as I know. It has nothing to do with galleries. You just upload the file using the custom field, and it uploads it to the directory you set using the settings you’ve entered. If you don’t upload a file while in a specific entry, it has no way of knowing which entry each pre-exiting file is associated with.

Does that help? -Matt

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
16 years ago
Deron Sizemore's avatar Deron Sizemore

Hi Matt,

Sorry for the confusion. 😉 I realize it doesn’t have anything to do with galleries, but I was attempting to explain my setup. I’ve created a gallery (a few months ago) using a the weblog as a gallery method (instead of the gallery module).

I was able to get the File extension to work perfectly when creating a new entry with picture upload. What I wasn’t able to figure out (and this may not be possible, but what I’m trying to figure out) is if there is a way to change all existing images in my gallery over so that they work with the File extension? By going into my weblog administration custom field settings and changing my image custom file from “text input” to “File” type, this makes all of my existing images not work and I’m just looking for a way to fix that without going in and re-uploading all of the existing images.

Thoughts?

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

Now I understand! Unfortunately I don’t think there’s a way to easily do it, but you may be able to do it with some clever SQL conversions. As far as I know, File stores the picture path information in the database as a text string, delimiting with \r between a file and it’s thumbnail, and \n between different files. There’s also a \r at the end of the string in a File field set for multiple = yes. So, it may be worth writing SQL to fill out the file field automatically given the database entries for the other field. Make sure to play around on a database copy before doing anything on your production one though!

The other thing to consider is just making File a new field, and using a conditional statement in your template to see if the image is there using File, or the gallery field.

Does that help at all?

-Matt

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
16 years ago
Deron Sizemore's avatar Deron Sizemore

Matt,

Yep, that helps out a lot! I might give the conditional statement route a try because the words “clever” and “SQL” aren’t in my vocabulary. I know zero SQL. 😉

Thanks for your help.

       
First 38 39 40 41 42 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.