title => $params{title},
description => $params{description},
);
+ $file->itime($params{mtime}) if $params{mtime};
+ $params{itime} = $params{mtime} if $params{mtime};
}
} else {
$exists = 1;
# load itime for new file
$file->save->load;
}
- $main::lxdebug->message(LXDebug->DEBUG2(), "backend3=" .$file->backend);
+
+ $file->mtime(DateTime->now_local) unless $params{mtime};
+ $file->mtime($params{mtime} ) if $params{mtime};
+
my $backend = $self->_get_backend($file->backend);
$params{dbfile} = $file;
$backend->save(%params);
- $file->mtime(DateTime->now_local);
$file->save;
#ShopImage
if($file->object_type eq "shop_image"){
setup();
SL::File->sync_from_backend( file_type => 'document');
-SL::File->sync_from_backend( file_type => 'attachments');
-SL::File->sync_from_backend( file_type => 'images');
+SL::File->sync_from_backend( file_type => 'attachment');
+SL::File->sync_from_backend( file_type => 'image');
1;