[Release] Stage to Main#829
Merged
Merged
Conversation
…pe (#825) ## Description Fixes the blocker where uploading `.ai` files fails validation with "This file is in a format not supported for conversion to PDF" (MWPW-198934). Affects any verb that accepts these formats, not just the new ones. **Root cause:** In `handleFileUpload`, the MIME was derived as `file.type || getMimeType(file)`. Browsers report `.ai` as `application/postscript` (wrong, non-empty), so the `||` keeps it and skips the canonical-MIME fallback → not in `allowedFileTypes` → rejected. (`.indd` reports empty → fallback rescues it; `.psd` reports the correct type → both already worked.) **Fix:** Flip the precedence to `(await this.getMimeType(file)) || file.type` so the extension-derived canonical MIME wins for the proprietary formats `getMimeType` maps (`.ai`, `.psd`, `.indd`, `.form`). All other extensions are unaffected. Also ensures the correct `format` is sent to createAsset/connector. Added tests for `.ai`, `.psd`, and `.jpg`. > Confirmed separately with BE (@nemahaja) that the `jpg-to-pdf` conversion path accepts AI/PSD/INDD as inputs. ## Related Issue <!-- Link to the JIRA ticket or GitHub issue that this PR resolves --> Resolves: [MWPW-198934](https://jira.corp.adobe.com/browse/MWPW-198934) ## Test URLs <!-- List the URLs where the changes can be tested --> - https://stage--da-dc--adobecom.aem.page/acrobat/online/test/ai-to-pdf?unitylibs=mwpw-198934-upload-ai-images - https://stage--da-dc--adobecom.aem.page/acrobat/online/test/psd-to-pdf?unitylibs=mwpw-198934-upload-ai-images - https://stage--da-dc--adobecom.aem.page/acrobat/online/test/indd-to-pdf?unitylibs=mwpw-198934-upload-ai-images - https://stage--da-dc--adobecom.aem.page/acrobat/online/test/jpg-to-pdf?unitylibs=mwpw-198934-upload-ai-images Co-authored-by: Manasvi Agrawal <maagrawal@Manasvis-MacBook-Pro.local>
<!-- Before submitting, please review all open PRs. --> * add direct upload support to more convert verbs Resolves: [MWPW-198657](https://jira.corp.adobe.com/browse/MWPW-198657) **Test URLs:** - Before: https://main--da-dc--adobecom.aem.live/acrobat/online/jpg-to-pdf?martech=off&unitylibs=stage - After: https://main--da-dc--adobecom.aem.live/acrobat/online/jpg-to-pdf?martech=off&unitylibs=MWPW-198657 - Before: https://main--da-dc--adobecom.aem.live/acrobat/online/png-to-pdf?martech=off&unitylibs=stage - After: https://main--da-dc--adobecom.aem.live/acrobat/online/png-to-pdf?martech=off&unitylibs=MWPW-198657 - Before: https://main--da-dc--adobecom.aem.live/acrobat/online/ppt-to-pdf?martech=off&unitylibs=stage - After: https://main--da-dc--adobecom.aem.live/acrobat/online/ppt-to-pdf?martech=off&unitylibs=MWPW-198657 - Before: https://main--da-dc--adobecom.aem.live/acrobat/online/excel-to-pdf?martech=off&unitylibs=stage - After: https://main--da-dc--adobecom.aem.live/acrobat/online/excel-to-pdf?martech=off&unitylibs=MWPW-198657 - Before: https://main--dc-frictionless--adobecom.aem.live/heic-to-pdf?martech=off&unitylibs=stage - After: https://main--dc-frictionless--adobecom.aem.live/heic-to-pdf?martech=off&unitylibs=MWPW-198657 ## Testing Notes **Change:** Added `ppt-to-pdf`, `excel-to-pdf`, `jpg-to-pdf`, `png-to-pdf`, and `heic-to-pdf` to `directUploadVerbs` in `target-config.json`. Files ≤ 1 MB on these verbs now use the single-step `POST /asset/upload` direct upload path instead of the create-asset → chunk → finalize chain. --- ### For each verb (`ppt-to-pdf`, `excel-to-pdf`, `jpg-to-pdf`, `png-to-pdf`, `heic-to-pdf`) **Small file (≤ 1 MB) — direct upload path (new behavior)** - [ ] Upload a valid file under 1 MB - [ ] Verify the upload completes and redirects to Acrobat successfully - [ ] Verify no finalize/polling step occurs (should be faster than before) - [ ] Verify the converted PDF opens correctly in Acrobat **Large file (> 1 MB) — standard chunked path (unchanged behavior)** - [ ] Upload a valid file over 1 MB - [ ] Verify the upload follows the standard create-asset → chunk → finalize flow - [ ] Verify redirect to Acrobat and PDF opens correctly - [ ] Confirm no direct upload endpoint is called for large files --- ### Regression: `word-to-pdf` (must be unaffected) - [ ] Small file (≤ 1 MB, `.doc` or `.docx`): direct upload path still works - [ ] Large file (> 1 MB, `.doc` or `.docx`): chunked path with finalize-await still works ### Regression: other verbs (`compress-pdf`, `pdf-to-word`, etc.) - [ ] Verify upload and redirect behavior is unchanged for verbs not in `directUploadVerbs` --- Co-authored-by: Ruchika Sinha <tek10248@Ruchikas-MacBook-Pro.local>
Ruchika4
approved these changes
Jun 24, 2026
Collaborator
|
Done with stage validation, all looks fine. Found on issue on stage, Logged bug on that: MWPW-199486 Test results: MWPW-199469 |
vipu0303
approved these changes
Jun 24, 2026
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.
Test URLs: