Improvement for Incorrect file size for Category image, Download file and Sample, additional query request overhead. #7678 #7679
+203
−149
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.
Proposal for #7678
Improvement to FileSize for Category, Download and Sample
Populate the FilePond schema for
This avoids additional queries against the respective controllers returning the HTML size to the control (which is incorrect), since the files array for FilePond is already popualted with this content.
Refactoring front end JS
GetAcceptedMimeTypes
toMediaSettings
to avoid duplicate code (in future this could be added to settings to allow user to override I guess, for now readonly..click
->on('click',fn())
,NOTE: Depending on the configuration of the
PictureService
orDownloadService
(via 3rd parties) the fileSize of the attachments may NOT be populated. It is not guaranteed this value is set, nor for performance should it be. See proposal in #7678 for ideas to introduce a size attribute to db to cache this information (avoiding the need to pull down large objects just to obtain filesize)This should be a non breaking change.