my ($self, $r, $filename, $offered_name) = @_;
my $mm = File::MMagic->new;
my $res = $mm->checktype_filename($filename);
- warn "$filename is a $res\n";
if ($res =~ m{/x-zip} or $offered_name =~ /t(ar\.)?gz$/i) {
return $self->upload_archive($r, $filename);
} elsif ($offered_name =~ /\.(raw|nef|dng|cr2)/i) {
$photo->make_thumb;
my $tags = $r->{params}{tags}.join " ", map { qq{"$_"} } $photo->tags_exif;
$photo->add_tags($tags);
-warn "D";
$photo->add_to_imageseek_library;
Memories->zap_cache();
-warn "E";
-
# Add system tags here
my $tag = "date:".$photo->shot->ymd;
$photo->add_to_system_tags({tag => Memories::SystemTag->find_or_create({name =>$tag}) });
my $resized = Memories->config->{sizes}->[$size];
if (!$resized) { cluck "Asked for crazy size $size"; return; }
if ($resized eq "full") { return $self->path("url") }
- warn "Looking for path ".$self->path(file => $resized);
$self->scale($resized)
unless -e $self->path( file => $resized );
return $self->path(url => $resized);