Skip to content

Commit

Permalink
feat(envited.ascs.digital): update runtime
Browse files Browse the repository at this point in the history
Signed-off-by: Roy Scheeren <[email protected]>
  • Loading branch information
royscheeren committed Jan 7, 2025
1 parent 9759767 commit 007afc7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 10 additions & 2 deletions apps/envited.ascs.digital/common/ipfs/ipfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@ export const uploadFile =
// },
// })


if (group) {
return pinata.upload.file(new File([arrayBuffer], filename)).addMetadata({ name: filename }).group(group).then(prop('IpfsHash'))
return pinata.upload
.stream(stream)
.addMetadata({ name: filename })
.group(group)
.then(prop('IpfsHash'))
}

return pinata.upload.file(new File([arrayBuffer], filename)).addMetadata({ name: filename }).then(prop('IpfsHash'))
return pinata.upload
.file(new File([arrayBuffer], filename))
.addMetadata({ name: filename })
.then(prop('IpfsHash'))
}

export const createGroup = (pinata: PinataSDK) => async (groupName: string) => {
Expand Down
2 changes: 2 additions & 0 deletions apps/envited.ascs.digital/stacks/Envited.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export default function Envited({ stack }: StackContext) {
vpc,
timeout: 60,
memorySize: 1024,
runtime: 'nodejs20.x',
},
events: ['object_created_put'],
},
Expand Down Expand Up @@ -177,6 +178,7 @@ export default function Envited({ stack }: StackContext) {
bind: [uploadsBucket, assetsBucket],
memorySize: '1024 MB',
timeout: '20 seconds',
runtime: 'nodejs20.x',
cdk: {
server: {
vpc,
Expand Down

0 comments on commit 007afc7

Please sign in to comment.