diff --git a/acrobat/blocks/verb-widget/limits.js b/acrobat/blocks/verb-widget/limits.js index 4457b30b..f9436f94 100644 --- a/acrobat/blocks/verb-widget/limits.js +++ b/acrobat/blocks/verb-widget/limits.js @@ -1,25 +1,37 @@ const LIMITS = { fillsign: { - maxFileSize: 100000000, // 100 MB + maxFileSize: 104857600, // 100 MB maxFileSizeFriendly: '100 MB', // 100 MB - acceptedFiles: '.pdf', + acceptedFiles: ['application/pdf'], maxNumFiles: 1, + multipleFiles: false, mobileApp: true, }, 'delete-pages': { maxFileSize: 100000000, // 1 MB - acceptedFiles: '.pdf', + acceptedFiles: ['application/pdf'], maxNumFiles: 1, }, 'number-pages': { maxFileSize: 100000000, // 1 MB - acceptedFiles: '.pdf', + acceptedFiles: ['application/pdf'], maxNumFiles: 1, }, 'compress-pdf': { - maxFileSize: 100000000, - acceptedFiles: '.pdf', - maxNumFiles: 1, + maxFileSize: 2147483648, + maxFileSizeFriendly: '2 GB', + acceptedFiles: [ + 'application/pdf', + 'application/msword', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'application/vnd.ms-powerpoint', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'application/vnd.ms-excel', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'image/jpeg', + 'image/png', + ], + multipleFiles: true, }, }; diff --git a/acrobat/blocks/verb-widget/verb-widget.js b/acrobat/blocks/verb-widget/verb-widget.js index 9a36104a..1ccf9104 100644 --- a/acrobat/blocks/verb-widget/verb-widget.js +++ b/acrobat/blocks/verb-widget/verb-widget.js @@ -133,7 +133,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);