Next.js Discord

Discord Forum

Not able to use File Constructor in NextJS 13 for existing images ?

Unanswered
Masai Lion posted this in #help-forum
Open in Discord
Masai LionOP
I'm trying to convert existing images to a File Object to post in my form. The logic here https://stackoverflow.com/questions/62179675/how-to-convert-image-source-into-a-javascript-file-object is working fine in raw JS.

In NextJS, its not allowing me to use File() constructor. Have converted the component using "use client" as well. Is there a way or library to achieve this ?

0 Replies