Skip to content

Commit

Permalink
Added saveguard against saving long file names in the database
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLeChat committed Mar 4, 2024
1 parent 5d76bb2 commit 8b9f5de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/[locale]/dashboard/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ export async function uploadFiles(
? (
await prisma.file.create( {
data: {
name: file.name,
name: file.name.slice( 0, 128 ),
userId: session.user.id,
status,
expiration:
Expand Down

0 comments on commit 8b9f5de

Please sign in to comment.