[MWPW-200290]Restrict accepted file types and fix redirect mapping for adobe file format verbs#142
Open
Ruchika4 wants to merge 3 commits into
Open
[MWPW-200290]Restrict accepted file types and fix redirect mapping for adobe file format verbs#142Ruchika4 wants to merge 3 commits into
Ruchika4 wants to merge 3 commits into
Conversation
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## stage #142 +/- ##
==========================================
- Coverage 81.44% 80.26% -1.18%
==========================================
Files 45 45
Lines 9594 9599 +5
==========================================
- Hits 7814 7705 -109
- Misses 1780 1894 +114 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restricts accepted file types for frictionless verbs to match the approved verb-to-format matrix.

Key changes in
verb-widget.js:COMMON_TO_PDF_FILES— the shared set for most to-PDF verbs: image formats (jpg/jpeg/png/heic/tif/tiff/bmp/gif) + office docs (doc/docx/ppt/pptx/xls/xlsx/rtf/txt/text). Removes previously accepted specialty formats (PSD, AI, INDD) and legacy types (xml, form) from these verbs.CREATEPDF_FILES—COMMON_TO_PDF_FILES+.psd/.ai/.indd, used bycreatepdfwhich accepts all formats per spec.psd-to-pdf,ai-to-pdf,indd-to-pdfnow accept only their respective single format (.psd,.ai,.indd) instead of the full file list.verbRedirMap:psd-to-pdf,ai-to-pdf,indd-to-pdfnow redirect tocreatepdfinstead ofjpgtopdf.compress-pdf,summarize-pdf,ocr-pdf,chat-pdf,pdf-to-*, etc.).Verbs and their new accepted types:
createpdfjpg-to-pdf,png-to-pdf,word-to-pdf,excel-to-pdf,ppt-to-pdfimage-to-pdf,bmp-to-pdf,gif-to-pdf,tiff-to-pdfpsd-to-pdf.psdonlyai-to-pdf.aionlyindd-to-pdf.inddonlyTests updated (
verb-widget-ios-accept.test.js):image-to-pdf,bmp-to-pdf,gif-to-pdf,tiff-to-pdffromIOS_UNKNOWN_VERBS— they no longer carry iOS-unknown extensions so the file picker no longer falls back toaccept="*/*"on iOS.psd-to-pdfdesktop test: now asserts.psdis present and.pdfis absent.jpg-to-pdfiOS test: now asserts specific types are present (.jpg,.heic) and specialty formats are absent.Test plan
/acrobat/online/jpg-to-pdf), open the file picker and verify only the expected types are selectable (no PSD/AI/INDD options visible)./acrobat/online/psd-to-pdf, verify the file picker only accepts.psd./acrobat/online/ai-to-pdf, verify the file picker only accepts.ai./acrobat/online/indd-to-pdf, verify the file picker only accepts.indd./acrobat/online/convert-pdf, verify all formats including PSD/AI/INDD and HEIC are accepted.psd-to-pdf/ai-to-pdf/indd-to-pdfstill showaccept="*/*"(specialty formats trigger the iOS fallback), whilejpg-to-pdfand image verbs now show specific types. This was added because on iPhone ai, psd and indd formats were not getting detected hence all file types were allowed in file selector. It is the current behavior too.npm run wtr:file -- ./test/blocks/verb-widget/verb-widget-ios-accept.test.jsTest URLs:
Resolves: MWPW-200290
MWPW-200292
MWPW-200305