Where is the path to upload image ? Error: ENOENT: no such file or directory, open '/public/uploads

Hello,

I want to upload a image in a folder named “uploads”. But I got this error:

ERROR  [Error: ENOENT: no such file or directory, open '/public/uploads/352594D1-0F11-4E0F-BFDB-B28CC48A78F2.png'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/public/uploads/352594D1-0F11-4E0F-BFDB-B28CC48A78F2.png'

Codesnippet:

     uploadHandler = unstable_createFileUploadHandler({
        maxPartSize: 10_000_000,
        directory: "/public/uploads",
        file: ({ filename }) => filename,
      });

     formData = await unstable_parseMultipartFormData(
        request,
        uploadHandler
      );

I tried

/public/uploads/
public/uploads/
../../public/uploads/

but nothing is working

PS:
app directory
ntt

Where are you uploading the file from? Is this on your Frontend or in Netlify Functions?

from netlify functions, (in the backend)

Hi there! Thanks for your interest in Netlify CMS. Looks like you posted your question a little while ago, but that you haven’t received a solution yet. Here’s where you might get more help:

netlifycms.org - the site houses our extensive documentation that likely contains helpful information to get you back on track.

netlify cms slack - join our friendly slack channel and chat with other cms pros to get the help you need.

GitHub Issues - think you’ve found a bug, or would like to make a feature request? Make your voice heard here. Netlify CMS is open source - PRs and other contributions are also welcome!

Stack Overflow Check StackOverflow for questions tagged “Netlify CMS” if you don’t get an answer in the Slack or the GH issues. StackOverflow reaches a worldwide audience of knowledgeable people.

Your question will be left open here for anyone to comment - but we encourage you to check out the above resources if you are still looking for a solution!