Skip to content

Commit

Permalink
Adding multiple attribute and increasing max file size in compress pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinrivero committed Dec 18, 2024
1 parent ce6fa7e commit 8464b5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions acrobat/blocks/verb-widget/limits.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const LIMITS = {
maxNumFiles: 1,
},
'compress-pdf': {
maxFileSize: 100000000,
maxFileSize: 2000000000,
acceptedFiles: '.pdf',
maxNumFiles: 1,
maxFileSizeFriendly: '2 GB',
},
};

Expand Down
9 changes: 8 additions & 1 deletion acrobat/blocks/verb-widget/verb-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,14 @@ export default async function init(element) {
}

const widgetMobileButton = createTag('a', { class: 'verb-mobile-cta', href: mobileLink }, window.mph['verb-widget-cta-mobile']);
const button = createTag('input', { type: 'file', accept: LIMITS[VERB].acceptedFiles, id: 'file-upload', class: 'hide', 'aria-hidden': true });
const button = createTag('input', {
type: 'file',
accept: LIMITS[VERB]?.acceptedFiles,
id: 'file-upload',
class: 'hide',
'aria-hidden': true,
...(LIMITS[VERB]?.multipleFiles && { multiple: '' }),
});
const widgetImage = createTag('div', { class: 'verb-image' });
const verbIconName = `${VERB}`;
const verbImageSvg = createSvgElement(verbIconName);
Expand Down

0 comments on commit 8464b5b

Please sign in to comment.