Skip to content

Commit

Permalink
Merge pull request #850 from adobecom/MWPW-160053
Browse files Browse the repository at this point in the history
MWPW-159547 & MWPW-160053
  • Loading branch information
Blainegunn authored Oct 11, 2024
2 parents 625eaa0 + 6c3e620 commit 82eae51
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
8 changes: 4 additions & 4 deletions acrobat/blocks/verb-widget/limits.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ const LIMITS = {
fillsign: {
maxFileSize: 100000000, // 100 MB
maxFileSizeFriendly: '100 MB', // 100 MB
acceptedFiles: ['application/pdf'],
acceptedFiles: '.pdf',
maxNumFiles: 1,
mobileApp: true,
},
'delete-pages': {
maxFileSize: 100000000, // 1 MB
acceptedFiles: ['application/pdf'],
acceptedFiles: '.pdf',
maxNumFiles: 1,
},
'number-pages': {
maxFileSize: 100000000, // 1 MB
acceptedFiles: ['application/pdf'],
acceptedFiles: '.pdf',
maxNumFiles: 1,
},
'compress-pdf': {
maxFileSize: 100000000,
acceptedFiles: ['application/pdf'],
acceptedFiles: '.pdf',
maxNumFiles: 1,
},
};
Expand Down
5 changes: 1 addition & 4 deletions acrobat/blocks/verb-widget/verb-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ 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', 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 });
const widgetImage = createTag('div', { class: 'verb-image' });
const verbIconName = `${VERB}`;
const verbImageSvg = createSvgElement(verbIconName);
Expand Down Expand Up @@ -167,7 +167,6 @@ export default async function init(element) {

// Redirect after IMS:Ready
window.addEventListener('IMS:Ready', () => {
console.log('IMS:Ready 😎');
if (window.adobeIMS.isSignedInUser()
&& window.adobeIMS.getAccountType() !== 'type1') {
redDir(VERB);
Expand All @@ -176,7 +175,6 @@ export default async function init(element) {
// Race Condition
if (window.adobeIMS?.isSignedInUser()
&& window.adobeIMS?.getAccountType() !== 'type1') {
console.log('Race Con ⏩');
redDir(VERB);
}

Expand Down Expand Up @@ -260,7 +258,6 @@ export default async function init(element) {

element.addEventListener('unity:show-error-toast', (e) => {
// eslint-disable-next-line no-console
console.log(`⛔️ Error Code - ${e.detail?.code}`);
if (e.detail?.code.includes('error_only_accept_one_file')) {
handleError(e.detail?.message);
verbAnalytics('error', VERB);
Expand Down
1 change: 0 additions & 1 deletion acrobat/scripts/alloy/verb-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default function init(eventName, verb, metaData) {
// eslint-disable-next-line consistent-return
return tokenPayload.sub || tokenPayload.user_id;
}
console.log(`📡 Event Name - acrobat:verb-${verb}:${eventName} - metaData: ${metaData?.type} / ${metaData?.size} `);
const event = {
documentUnloading: true,
data: {
Expand Down

0 comments on commit 82eae51

Please sign in to comment.