Skip to content

Commit

Permalink
Update S3File Record to allow SVG file uploads and sets the iconf typ…
Browse files Browse the repository at this point in the history
…e for files that aren't bitmaps.
  • Loading branch information
perlDreamer committed Apr 19, 2024
1 parent 59d2447 commit f4a4e46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ outline: deep
## 2024-04-19
* Fixed a problem where the default values set by a parent on child records wasn't being respected.
* Update lambda file upload function to handle CSV files and other file types by returning the file size.
* Update S3File Record to allow SVG file uploads and sets the iconf type for files that aren't bitmaps.

## 2024-04-18
* Cast result of sum() and avg() to number.
Expand Down
6 changes: 6 additions & 0 deletions ving/record/records/S3File.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ export class S3FileRecord extends VingRecord {
self.set('icon', 'thumbnail');
delete metadata.thumbnail;
}
else if (self.get('extension') == 'svg') {
self.set('icon', 'self');
}
else {
self.set('icon', 'extension');
}
if (metadata.sizeInBytes) {
self.set('sizeInBytes', metadata.sizeInBytes);
delete metadata.sizeInBytes;
Expand Down

0 comments on commit f4a4e46

Please sign in to comment.