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

TPE's avatar
TPE
99 posts
16 years ago
TPE's avatar TPE
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!

Brother you saved me…

       
leadsuccess's avatar
leadsuccess
408 posts
16 years ago
leadsuccess's avatar leadsuccess

I am currently using this extension and have run into an issue. I have had to use exp:query tag and I pull a query including the field_id_50 which is my custom photo field I get the name of the file and nothing else, (i.e. holiday_fireworks.jpg). Now if I run the same with the weblog tag I get the full path (i.e. http://www.example.com/uploads/events/cache/holiday_fireworks-350x250). Am I missing something here, is there a way to pull the path when using the query tag?

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

The extension is adding on the site url and file upload path for you. I’d consider hardcoding the file upload URL for field_id_50 into the template right before the call to get the file name.

       
leadsuccess's avatar
leadsuccess
408 posts
16 years ago
leadsuccess's avatar leadsuccess

Thanks slapshotw, that is what I thought too. What I was going to do is pull the url from the db but that would require more MySQL muscle and don’t want to put more overhead on the site.

       
outline4's avatar
outline4
271 posts
16 years ago
outline4's avatar outline4

hi there,

I am using the latest file extension with almost all of the bugfixes (I keep updating it…). working like a charm. but, since 1.67, if I try to upload a file with the same name that already existst, the “Automagically rename this file the next time it’s uploaded?” has stopped working. it’s not a major thing, but out of completeness, has anybody got a fix for this problem?

–

and (drumroll) if you want to add captions and other stuff or make files sortable then this might be your solution (until LG finds a way to implement files into datamatrix):

http://ellislab.com/forums/viewthread/87125/P54/#494288 working surprisingly well. all the customer has to do is copy/paste the image name…

cheers stefan

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

I’ve just discovered that 3.1.1, when set to “Auto” size with a “max width” and “max height” defined, that the images produced are ‘gifs’ regardless of the source file.

To make things even more confusing, the extension of the source file provided is saved to the new file. So, if I set my max dimensions to 600 x 600 and upload an image (jpg) larger, the extension does it’s resizing and produces an image that says it’s a jpg but is actually a gif.

How do I know, well, the first clue was the dithering which is indicative of being a gif. And when saving the new image to my machine so I could open in my image editor of choice, I got an error “invalid JPEG marker type found”. I switched the files extension to gif and whala…it opened.

I’m scoured this thread to see if there was anything mentioning this but could not find anything.

Here is a live example. This image is smaller than the set max so the resulting image should look just about the same. Original Produced by the extension

Wondering if anyone might have a fix for this?

Thanks.

       
outline4's avatar
outline4
271 posts
16 years ago
outline4's avatar outline4
I’ve just discovered that 3.1.1, when set to “Auto” size with a “max width” and “max height” defined, that the images produced are ‘gifs’ regardless of the source file. To make things even more confusing, the extension of the source file provided is saved to the new file. So, if I set my max dimensions to 600 x 600 and upload an image (jpg) larger, the extension does it’s resizing and produces an image that says it’s a jpg but is actually a gif. How do I know, well, the first clue was the dithering which is indicative of being a gif. And when saving the new image to my machine so I could open in my image editor of choice, I got an error “invalid JPEG marker type found”. I switched the files extension to gif and whala…it opened. I’m scoured this thread to see if there was anything mentioning this but could not find anything. Here is a live example. This image is smaller than the set max so the resulting image should look just about the same. Original Produced by the extension Wondering if anyone might have a fix for this? Thanks.

you’re not alone 😉 here’s the fix:

http://ellislab.com/forums/viewthread/38997/P360/#335581 http://ellislab.com/forums/viewthread/72506/

cheers stefan

       
taktak's avatar
taktak
24 posts
16 years ago
taktak's avatar taktak

EDIT: Nevermind, it was something on my part that screwed it up.

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

outline4 - thank you, thank you very much!

I knew I had seen this fix before but looking thru this thread has become more than outrageous! Unfortunately, it seems to the a necessary evil at this point in time.

Regards!

       
outline4's avatar
outline4
271 posts
16 years ago
outline4's avatar outline4
outline4 - thank you, thank you very much! I knew I had seen this fix before but looking thru this thread has become more than outrageous! Unfortunately, it seems to the a necessary evil at this point in time. Regards!

you’re welcome,

someone should take over the file develoment, add all the bugfixes and some of the most requested features… damn… this is still my n°1 extension… coudn’t live without it… and there’s no replacement, or is there?

cheers stefan

       
Chris Newton's avatar
Chris Newton
440 posts
16 years ago
Chris Newton's avatar Chris Newton

I tried to contact Mark Huot about taking it over, but got no response. The file itself is copyrighted, so I can’t just add the fixes and post them here. I’m in the process of rebuilding it from the ground up though, with all of the current problems addressed. I should be able to release the rebuilt extension soon, say… early next week. I’m in the process of testing and bug correction now. So, sooner than later.

       
outline4's avatar
outline4
271 posts
16 years ago
outline4's avatar outline4
I tried to contact Mark Huot about taking it over, but got no response. The file itself is copyrighted, so I can’t just add the fixes and post them here. I’m in the process of rebuilding it from the ground up though, with all of the current problems addressed. I should be able to release the rebuilt extension soon, say… early next week. I’m in the process of testing and bug correction now. So, sooner than later.

uhhh… wow!

will there be custom file fields? like the possibiltiy to add titles, descriptions? will it be sortable?

cheers

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

Actually, I noticed this last week. Can’t say why I hadn’t earlier…but look at the copyright at the head of the file:

/* ===================================================== Multi Relationship —————————————————– http://docs.markhuot.com/ —————————————————– Copyright (c) 2007 - today Mark Huot ===================================================== THIS MODULE IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND OR NATURE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. ===================================================== File: ext.mh_multi_relationship_ext.php —————————————————– Purpose: Multiple Relationship Drop Down - EXT ===================================================== */

😊

I’d say this was copied and pasted. And yes, in good faith we all are honoring it.

       
Chris Newton's avatar
Chris Newton
440 posts
16 years ago
Chris Newton's avatar Chris Newton

Yes. Titles. Descriptions. For the first release, no sort. For the next… yes. A few other minor things too, like image size & width.

       
PhireGuys's avatar
PhireGuys
525 posts
16 years ago
PhireGuys's avatar PhireGuys

This may be in the thread, but it is too long to look into each post.

Is there a way to use this with SAEF (Stand-alone entry form)?

       
First 51 52 53 54 55 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.