[Koha-bugs] [Bug 22508] Add the ability to prefill 856$u with the direct URL of the file

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 13 15:10:36 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22508

--- Comment #34 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Marcel de Rooy from comment #29)
> +sub local_public_path {
> +    my ($self) = @_;
> +    my $upload_public_path = C4::Context->config('upload_public_path');
> +    return unless $upload_public_path;
> +    $upload_public_path =~ s|/$||;
> +    my $filepath = "$upload_public_path/" . $self->hashvalue;
> +    return $filepath;
> +}
> 
> Compare with full_path sub:
> my $path = File::Spec->catfile(
>         $self->permanent
>             ? $self->permanent_directory
>             : C4::Context->temporary_directory,
>         $self->dir,
>         $self->hashvalue. '_'. $self->filename,
>     );
> 
> You do not use the filename only the hashvalue?

Yes, see commit message:
      * FIXME: in upload_public_path the files are not suffixed by the
      filename as it is for upload_path. We certainly want to be consistent
      here.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list