Skip to content

Commit

Permalink
add mimeType to images
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSchlachter committed Mar 1, 2024
1 parent be9cefb commit d7effeb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xmpls/attachments/db/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ module.exports = async function () {

const { 'sap.common.Images': Images } = cds.model.entities
await attachments.put (Images, [
[ '1004155', 'Daniel Watts.png' ],
[ '1004161', 'Stormy Weathers.png' ],
[ '1004100', 'Sunny Sunshine.png' ]
].map(([ ID, filename ]) => ({
ID, filename,
[ '1004155', 'Daniel Watts.png', 'image/png' ],
[ '1004161', 'Stormy Weathers.png', 'image/png' ],
[ '1004100', 'Sunny Sunshine.png', 'image/png' ]
].map(([ ID, filename, mimeType ]) => ({
ID, filename, mimeType,
content: createReadStream (join(__dirname, 'content', filename)),
})))

Expand Down

0 comments on commit d7effeb

Please sign in to comment.