Lines 61-68
use C4::Context;
Link Here
|
61 |
sub _get_file_path { |
61 |
sub _get_file_path { |
62 |
my ($id, $dirname, $filename) = @_; |
62 |
my ($id, $dirname, $filename) = @_; |
63 |
|
63 |
|
64 |
my $uploadPath = C4::Context->config('uploadPath'); |
64 |
my $upload_path = C4::Context->config('upload_path'); |
65 |
my $filepath = "$uploadPath/$dirname/${id}_$filename"; |
65 |
my $filepath = "$upload_path/$dirname/${id}_$filename"; |
66 |
$filepath =~ s|/+|/|g; |
66 |
$filepath =~ s|/+|/|g; |
67 |
|
67 |
|
68 |
return $filepath; |
68 |
return $filepath; |
Lines 81-87
Hash keys are:
Link Here
|
81 |
|
81 |
|
82 |
=item * filename: name of the file |
82 |
=item * filename: name of the file |
83 |
|
83 |
|
84 |
=item * dir: directory where file is stored (relative to config variable 'uploadPath') |
84 |
=item * dir: directory where file is stored (relative to config variable 'upload_path') |
85 |
|
85 |
|
86 |
=back |
86 |
=back |
87 |
|
87 |
|
Lines 123-129
Parameters:
Link Here
|
123 |
|
123 |
|
124 |
=item * $filename: name of the file |
124 |
=item * $filename: name of the file |
125 |
|
125 |
|
126 |
=item * $dir: directory where to store the file (path relative to config variable 'uploadPath' |
126 |
=item * $dir: directory where to store the file (path relative to config variable 'upload_path' |
127 |
|
127 |
|
128 |
=item * $io_handle: valid IO::Handle object, can be retrieved with |
128 |
=item * $io_handle: valid IO::Handle object, can be retrieved with |
129 |
$cgi->upload('uploaded_file')->handle; |
129 |
$cgi->upload('uploaded_file')->handle; |