Skip to content

[Acrobat POC] Direct upload to unity service #789

Open
arugupta1992 wants to merge 8 commits into
stagefrom
direct-upload
Open

[Acrobat POC] Direct upload to unity service #789
arugupta1992 wants to merge 8 commits into
stagefrom
direct-upload

Conversation

@arugupta1992

Copy link
Copy Markdown
Collaborator
  • Add your
  • Specific
  • Features or fixes

Resolves: MWPW-NUMBER

Test URLs:

sanjayms01 and others added 8 commits May 22, 2026 15:41
…upy upload container (#775)

Resolves: [MWPW-194869](https://jira.corp.adobe.com/browse/MWPW-194869)

**Test URLs:**
- Before:
https://main--da-cc--adobecom.aem.live/drafts/arugupta/image-to-video/doodlebug/image-to-video-actual?unitylibs=stage
- After:
https://main--da-cc--adobecom.aem.live/drafts/arugupta/image-to-video/doodlebug/image-to-video-actual?unitylibs=MWPW-194869

---------

Co-authored-by: Arushi Gupta <arugupta@Arushis-MacBook-Pro.local>
Co-authored-by: Sanjay Saravanan <75960494+sanjayms01@users.noreply.github.com>
Co-authored-by: Vipul Gupta <vipugpta@gmail.com>
Co-authored-by: vipulg <vipulg@adobe.com>
Co-authored-by: Nishant Thakur <nishant.thakur.ece@gmail.com>
Co-authored-by: Ratko Zagorac <90400759+zagi25@users.noreply.github.com>
Co-authored-by: Ruchika Sinha <69535463+Ruchika4@users.noreply.github.com>
Co-authored-by: Manasvi Agrawal <maagrawal@adobe.com>
…778)

* Fix delay with config-based A/B testing api initiation

Resolves: [MWPW-194995(https://jira.corp.adobe.com/browse/MWPW-194995)

**Test URLs:**
- Before:
https://stage--da-dc--adobecom.aem.page/acrobat/online/compress-pdf?martech=off&unitylibs=stage
- After:
https://stage--da-dc--adobecom.aem.page/acrobat/online/compress-pdf?martech=off&unitylibs=target-test

**Implementation details:**
`this.pageConfigPromise = null (line 189)` initializes the field so it's
always defined on the instance.
`this.pageConfigPromise = this.ensurePageConfig() `(line 792, inside
initActionListeners when b === this.block) fires the fetch the moment
the verb-widget finishes rendering (for performance reasons), no await
so it doesn't block listener setup. The promise is stored so it can be
joined later.
`await (this.pageConfigPromise || this.ensurePageConfig()) `(line 580,
in handleFileUpload) if the widget has rendered (normal path), we await
the already in flight or resolved promise; if somehow pageConfigPromise
is null (edge case: upload triggered before initActionListeners ran with
the block), we fall back to calling it directly. The existing
pageConfigFetched guard inside ensurePageConfig still prevents double
execution.

---------

Co-authored-by: Arushi Gupta <65466846+arugupta1992@users.noreply.github.com>
Co-authored-by: Arushi Gupta <arugupta@Arushis-MacBook-Pro.local>
Co-authored-by: Sanjay Saravanan <75960494+sanjayms01@users.noreply.github.com>
Co-authored-by: Vipul Gupta <vipugpta@gmail.com>
Co-authored-by: vipulg <vipulg@adobe.com>
Co-authored-by: Nishant Thakur <nishant.thakur.ece@gmail.com>
Co-authored-by: Ratko Zagorac <90400759+zagi25@users.noreply.github.com>
Co-authored-by: Manasvi Agrawal <maagrawal@adobe.com>
<!-- Before submitting, please review all open PRs. -->

* Add your
* Specific
* Features or fixes

Resolves: [MWPW-NUMBER](https://jira.corp.adobe.com/browse/MWPW-NUMBER)

**Test URLs:**
- Before: https://main--unity--adobecom.aem.page/?martech=off
- After: https://<branch>--unity--adobecom.aem.page/?martech=off

---------

Co-authored-by: Ruchika Sinha <tek10248@macbook-pro-106.corp.adobe.com>
For files at or under 1MB on the word-to-pdf verb, skip the
createAsset → chunkPdf → finalize chain and instead POST the file
directly as multipart to /asset/upload, then call /asset/connector.
Reduces upload round-trips from 4 to 2 for small files.

Also incorporates verb-finalize optimization: verifyContent is
conditional fire-and-forget for verbs in fireAndForgetFinalize.

Points stage environment at unity-dev for testing the new API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
continueInApp() guards on operations.length before navigating;
directUploadSingleFile never pushed to operations so the guard
always failed and window.location.href was never set.

Also adds 'uploading' analytics event and setIsUploading(true)
to match the standard upload flow sequence.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aem-code-sync

aem-code-sync Bot commented May 25, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants