View | Details | Raw Unified | Return to bug 28576
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-errors.inc (-1 / +1 lines)
Lines 36-42 Link Here
36
        [% ELSIF ( error == 301 ) %]
36
        [% ELSIF ( error == 301 ) %]
37
            <span>An error has occurred while attempting to upload the image file. </span>[% INCLUDE asksysadmin %]
37
            <span>An error has occurred while attempting to upload the image file. </span>[% INCLUDE asksysadmin %]
38
        [% ELSIF ( error == 302 ) %]
38
        [% ELSIF ( error == 302 ) %]
39
            <span>Image exceeds 500KB. Please resize and import again. </span>
39
            <span>Image exceeds 2MB. Please resize and import again. </span>
40
        [% ELSIF ( error == 303 ) %]
40
        [% ELSIF ( error == 303 ) %]
41
            <span>The database image quota currently only allows a maximum of [% image_limit | html %] images to be stored at any one time. Please delete one or more images to free up quota space. </span>
41
            <span>The database image quota currently only allows a maximum of [% image_limit | html %] images to be stored at any one time. Please delete one or more images to free up quota space. </span>
42
        [% ELSIF ( error == 304 ) %]
42
        [% ELSIF ( error == 304 ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-1 / +1 lines)
Lines 276-282 Link Here
276
                                            [% ELSE %]
276
                                            [% ELSE %]
277
                                                <div class="hint">[% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %] does not currently have an image available. To import an image for [% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %], enter the name of an image file to upload.</div>
277
                                                <div class="hint">[% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %] does not currently have an image available. To import an image for [% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %], enter the name of an image file to upload.</div>
278
                                            [% END %]
278
                                            [% END %]
279
                                            <p>Only PNG, GIF, JPEG, XPM formats are supported. Maximum image size is 500KB.</p>
279
                                            <p>Only PNG, GIF, JPEG, XPM formats are supported. Maximum image size is 2MB.</p>
280
                                            <label for="uploadfile">Select the file to upload: </label>
280
                                            <label for="uploadfile">Select the file to upload: </label>
281
                                            <input type="file" id="uploadfile" name="uploadfile" required="required" />
281
                                            <input type="file" id="uploadfile" name="uploadfile" required="required" />
282
                                            <div class="action">
282
                                            <div class="action">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt (-1 / +1 lines)
Lines 39-45 Link Here
39
                        <p>Manage additional images to use as logo, decoration or background on a patron card layout.</p>
39
                        <p>Manage additional images to use as logo, decoration or background on a patron card layout.</p>
40
                        <form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
40
                        <form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
41
                            <fieldset class="brief">
41
                            <fieldset class="brief">
42
                                <div class="hint">Only PNG, GIF, JPEG, XPM formats are supported. Maximum image size is 500KB.</div>
42
                                <div class="hint">Only PNG, GIF, JPEG, XPM formats are supported. Maximum image size is 2MB.</div>
43
                                <ol>
43
                                <ol>
44
                                <li>
44
                                <li>
45
                                    <label for="uploadfile">Select the file to upload: </label>
45
                                    <label for="uploadfile">Select the file to upload: </label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt (-1 / +1 lines)
Lines 126-132 Link Here
126
                [% END %]
126
                [% END %]
127
            <form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data" id="upload_form">
127
            <form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data" id="upload_form">
128
                <fieldset class="rows">
128
                <fieldset class="rows">
129
                    <p><strong>NOTE:</strong> Only PNG, GIF, JPEG, XPM formats are supported.</p>
129
                    <p><strong>NOTE:</strong> Only PNG, GIF, JPEG, XPM formats are supported. Maximum image size is 2MB.</p>
130
                        <ol class="radio">
130
                        <ol class="radio">
131
                            <li>
131
                            <li>
132
                                <label for="zipfile"><input type="radio" id="zipfile" name="filetype" value="zip" checked="checked" /> Zip file</label></li>
132
                                <label for="zipfile"><input type="radio" id="zipfile" name="filetype" value="zip" checked="checked" /> Zip file</label></li>
(-)a/patroncards/image-manage.pl (-1 / +1 lines)
Lines 90-96 if ($op eq 'upload') { Link Here
90
            else {
90
            else {
91
                my $errstr = '';
91
                my $errstr = '';
92
                my $size = $image->Get('filesize');
92
                my $size = $image->Get('filesize');
93
                $errstr =  302 if $size > 500000;
93
                $errstr =  302 if $size > 2097152;
94
                $image->Set(magick => 'png'); # convert all images to png as this is a lossless format which is important for resizing operations later on
94
                $image->Set(magick => 'png'); # convert all images to png as this is a lossless format which is important for resizing operations later on
95
                my $err = put_image($image_name, $image->ImageToBlob()) || '0';
95
                my $err = put_image($image_name, $image->ImageToBlob()) || '0';
96
                $errstr = 101 if $err == 1;
96
                $errstr = 101 if $err == 1;
(-)a/tools/picture-upload.pl (-2 / +1 lines)
Lines 269-275 sub handle_file { Link Here
269
        # Now process any imagefiles
269
        # Now process any imagefiles
270
        $logger->debug("Source: $source");
270
        $logger->debug("Source: $source");
271
        my $size = ( stat($source) )[7];
271
        my $size = ( stat($source) )[7];
272
        if ( $size > 550000 ) {
272
        if ( $size > 2097152 ) {
273
            # This check is necessary even with image resizing to avoid possible security/performance issues...
273
            # This check is necessary even with image resizing to avoid possible security/performance issues...
274
            $filerrors{'OVRSIZ'} = 1;
274
            $filerrors{'OVRSIZ'} = 1;
275
            push my @filerrors, \%filerrors;
275
            push my @filerrors, \%filerrors;
276
- 

Return to bug 28576