day 78 - experimented with multipart forms (file uploads) using Server Actions in Next.js - refactored my 'createAnimal' Server Action (saves animal item to DB) to now accept image uploads ( feels much more flexible & realistic) #80DaysOfNextJS #NextJS15 #React #TypeScript

coding_robin's tweet image. day 78

- experimented with multipart forms (file uploads) using Server Actions in Next.js

- refactored my 'createAnimal' Server Action (saves animal  item to DB) to now accept image uploads ( feels much more flexible & realistic)

#80DaysOfNextJS #NextJS15 #React #TypeScript
coding_robin's tweet image. day 78

- experimented with multipart forms (file uploads) using Server Actions in Next.js

- refactored my 'createAnimal' Server Action (saves animal  item to DB) to now accept image uploads ( feels much more flexible & realistic)

#80DaysOfNextJS #NextJS15 #React #TypeScript
coding_robin's tweet image. day 78

- experimented with multipart forms (file uploads) using Server Actions in Next.js

- refactored my 'createAnimal' Server Action (saves animal  item to DB) to now accept image uploads ( feels much more flexible & realistic)

#80DaysOfNextJS #NextJS15 #React #TypeScript
coding_robin's tweet image. day 78

- experimented with multipart forms (file uploads) using Server Actions in Next.js

- refactored my 'createAnimal' Server Action (saves animal  item to DB) to now accept image uploads ( feels much more flexible & realistic)

#80DaysOfNextJS #NextJS15 #React #TypeScript

- added validation & error handlin (if no file or file > 3mb -> return error) - upload process -> create upload dir (if missin), convert file obj to buffer, save to /public/uploads and finally generate public URL for Next to serve #80DaysOfNextJS #NextJS15 #React #TypeScript


- works great for small/medium file uploads but ran into some 'Error: Body exceeded limit' issues - curious to see how it behaves with much larger uploads hmm🤔 #80DaysOfNextJS #NextJS15 #React #TypeScript


United States Trends
Loading...

Something went wrong.


Something went wrong.