Pro 1821/include all metadata#32
Pro 1821/include all metadata#32richardwarlden wants to merge 8 commits intoPRO-1815/get-access-token-with-postfrom
Conversation
kaskajp
left a comment
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
Hardcoded URL. Token endpoint could point to accounts on tech and staging?
src/js/fileselector.js
Outdated
| alert('Ett fel inträffade vid nerladdning av fil'); | ||
| me.isDownloading = false; | ||
| }, function(o) { | ||
| alert('Ett fel inträffade vid nerladdning av fil'); |
There was a problem hiding this comment.
Please add translations here while you're at it.
|
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. |
| description: description, | ||
| additionalInfo: me.file.additionalInfo, | ||
| customFields: me.file.customFields, | ||
| description: me.fileDescription.value, |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
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, andkeywordsso video selections return the same metadata fields as other paths.
- The movie view success payload now includes


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.successacross 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.successfromfileselector,cropperview, andmovieviewnow carry extra fields likeadditionalInfo,customFields,description,instructions, andkeywords.Custom fields are cleaned up and a bug is fixed.
fileinfofilterscustomFieldsto drop empty/null values, andfileselectorcorrectsheightto useme.file.height(was incorrectly using width) and standardizes download error messaging viaDOWNLOAD_FAILEDtranslation.Written by Cursor Bugbot for commit ccae386. This will update automatically on new commits. Configure here.