Skip to content

Pro 1821/include all metadata#32

Open
richardwarlden wants to merge 8 commits intoPRO-1815/get-access-token-with-postfrom
PRO-1821/include-all-metadata
Open

Pro 1821/include all metadata#32
richardwarlden wants to merge 8 commits intoPRO-1815/get-access-token-with-postfrom
PRO-1821/include-all-metadata

Conversation

@richardwarlden
Copy link

@richardwarlden richardwarlden commented Jan 28, 2026

PRO-1821 - Extend the query to return all metadata and custom fields

The following changes were made:

  • All metadata, collected for the FileInfo, is added to the resulting object.

  • The collection of custom fields are filtered to include only fields with actual values.


Note

Medium Risk
Medium risk because it changes the shape/content of objects returned via config.success across image/file/video selection flows, which may impact downstream consumers. Logic changes are straightforward (metadata plumbing and filtering) with minimal security implications.

Overview
Selection results now include more metadata. The objects passed to config.success from fileselector, cropperview, and movieview now carry extra fields like additionalInfo, customFields, description, instructions, and keywords.

Custom fields are cleaned up and a bug is fixed. fileinfo filters customFields to drop empty/null values, and fileselector corrects height to use me.file.height (was incorrectly using width) and standardizes download error messaging via DOWNLOAD_FAILED translation.

Written by Cursor Bugbot for commit ccae386. This will update automatically on new commits. Configure here.

Copy link
Contributor

@kaskajp kaskajp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of things otherwise good.

body.append("client_secret", client_secret);
body.append("refresh_token", refresh_token);

xhr.open('POST', 'https://accounts.mediaflow.com/oauth2/token');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded URL. Token endpoint could point to accounts on tech and staging?

alert('Ett fel inträffade vid nerladdning av fil');
me.isDownloading = false;
}, function(o) {
alert('Ett fel inträffade vid nerladdning av fil');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add translations here while you're at it.

@richardwarlden richardwarlden changed the base branch from develop to PRO-1815/get-access-token-with-post February 10, 2026 14:48
@henlfern
Copy link

Is this ready to merge into a new release of the File Selector @kaskajp Moving forward with the Umbraco integration, we need this functionality - and also for other integrations as well.

@kaskajp
Copy link
Contributor

kaskajp commented Mar 16, 2026

Is this ready to merge into a new release of the File Selector @kaskajp Moving forward with the Umbraco integration, we need this functionality - and also for other integrations as well.

There's a translation that's still not updated as far as I can see, but it doesn't necessarily stop a release.

It's only code reviewed from my end, not tested, so it should probably be verified on tech first.

@richardwarlden richardwarlden requested a review from kaskajp March 19, 2026 14:06
description: description,
additionalInfo: me.file.additionalInfo,
customFields: me.file.customFields,
description: me.fileDescription.value,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description value read lazily unlike other input fields

Low Severity

The removal of const description = me.fileDescription.value at the top of doDownload means description is now read from the DOM inside the async XHR callback + setTimeout, while altText and fileName are still captured eagerly at function entry. If the textarea value changes during the XHR round-trip (e.g., view teardown or user interaction), description could be stale or incorrect, unlike the other user-editable fields that are safely snapshotted upfront.

Additional Locations (1)
Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Movie view success callback missing new metadata fields
    • The movie view success payload now includes additionalInfo, customFields, instructions, and keywords so video selections return the same metadata fields as other paths.

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.

4 participants