Mailing List Archive

Re: [8565] Fixed bug 1461 , Find Media was giving an error when thumbnails
On Apr 9, 2009, at 2:41 AM, slanning@bricolage.cc wrote:

> Fixed bug 1461 , Find Media was giving an error when thumbnails
> couldn't be created.
> I think this isn't the real fix, or at least not a complete fix. For
> some reason, files ending in ".JPG" are given the MIME type "none",
> while ".jpg" works correctly.

Yes, it should be compared case-insensitively. Can you determine where
to fix that?

David
Re: [8565] Fixed bug 1461 , Find Media was giving an error when thumbnails [ In reply to ]
Does this help?

http://www.gossamer-threads.com/lists/bricolage/commits/35331

(Or is that onlye useful for new uploads?)

Cheers,

Bret


On Thu, 2009-04-09 at 09:14 -0700, David E. Wheeler wrote:
> On Apr 9, 2009, at 2:41 AM, slanning@bricolage.cc wrote:
>
> > Fixed bug 1461 , Find Media was giving an error when thumbnails
> > couldn't be created.
> > I think this isn't the real fix, or at least not a complete fix. For
> > some reason, files ending in ".JPG" are given the MIME type "none",
> > while ".jpg" works correctly.
>
> Yes, it should be compared case-insensitively. Can you determine where
> to fix that?
>
> David
>
--
Bret Dawson
Producer
Pectopah Productions Inc.
(416) 895-7635
bret@pectopah.com
www.pectopah.com
Re: [8565] Fixed bug 1461 , Find Media was giving an error when thumbnails [ In reply to ]
On Apr 9, 2009, at 9:32 AM, Bret Dawson wrote:

> http://www.gossamer-threads.com/lists/bricolage/commits/35331
>
> (Or is that onlye useful for new uploads?)

Yeah, so the problem is probably that $Imager::FORMATGUESS doesn't
recognize uppercase extensions:

% perl -MImager -le 'print $Imager::FORMATGUESS->("foo.JPG");'
jpeg

Hrm. No, that's not it…

Best,

David
Re: [8565] Fixed bug 1461 , Find Media was giving an error when thumbnails [ In reply to ]
On Thu, 9 Apr 2009, David E. Wheeler wrote:
> On Apr 9, 2009, at 9:32 AM, Bret Dawson wrote:
>> http://www.gossamer-threads.com/lists/bricolage/commits/35331
>>
>> (Or is that onlye useful for new uploads?)
>
> Yeah, so the problem is probably that $Imager::FORMATGUESS doesn't recognize
> uppercase extensions:
>
> % perl -MImager -le 'print $Imager::FORMATGUESS->("foo.JPG");'
> jpeg
>
> Hrm. No, that's not it…

I guess the `lc` I put there is useless, then, hmm..

I think it's the part in Media/Image.pm _modify_image
where it does

if (my $mime = $self->get_media_type) {
(my $mt = $mime->get_name) =~ s{.*/}{};
$format = $Imager::FORMATGUESS->(lc ".$mt") || $Imager::FORMATGUESS->(lc $path);

$mime->get_name is returning 'none'.
So it's in $get_em in lib/Bric/Util/MediaType.pm
that mapping stuff I guess.

But, it's nice out and 19:00 on the evening before a 4-day weekend,
so bleh.
Re: [8565] Fixed bug 1461 , Find Media was giving an error when thumbnails [ In reply to ]
On Apr 9, 2009, at 9:56 AM, Scott Lanning wrote:

> I guess the `lc` I put there is useless, then, hmm..
>
> I think it's the part in Media/Image.pm _modify_image
> where it does
>
> if (my $mime = $self->get_media_type) {
> (my $mt = $mime->get_name) =~ s{.*/}{};
> $format = $Imager::FORMATGUESS->(lc ".$mt") ||
> $Imager::FORMATGUESS->(lc $path);
>
> $mime->get_name is returning 'none'.
> So it's in $get_em in lib/Bric/Util/MediaType.pm
> that mapping stuff I guess.
>
> But, it's nice out and 19:00 on the evening before a 4-day weekend,
> so bleh.

At least file a bug report for this stuff, if you haven't already,
would you?

Thanks,

David