The most used, flexible, fast and streaming parser for multipart form data. Supports uploading to serverless environments, AWS S3, Azure, GCP or the filesystem. Used in production.
MIT License
7k
stars
680
forks
source link
Uploading to s3 using nuxt 3: __dirname is not defined #929
ReferenceError: __dirname is not defined 10:40:20
at file:///home/<folder>/Projects/workplaces/nuxtApps/nuxt-bko/.nuxt/dev/index.mjs:2470:42
at Array.forEach (<anonymous>)
at new IncomingForm (file:///home/<folder>/Projects/workplaces/nuxtApps/nuxt-bko/.nuxt/dev/index.mjs:2467:33)
at formidable (file:///home/<folder>/Projects/workplaces/nuxtApps/nuxt-bko/.nuxt/dev/index.mjs:3462:33)
at useFiles (file:///home/<folder>/Projects/workplaces/nuxtApps/nuxt-bko/.nuxt/dev/index.mjs:3532:16)
at file:///home/<folder>/Projects/workplaces/nuxtApps/nuxt-bko/.nuxt/dev/index.mjs:3561:37
at file:///home/<folder>/Projects/workplaces/nuxtApps/nuxt-bko/.nuxt/dev/index.mjs:514:14
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.handler (file:///home/<folder>/Projects/workplaces/nuxtApps/nuxt-bko/node_modules/h3/dist/index.mjs:990:19)
at async Server.toNodeHandle (file:///home/<folder>/Projects/workplaces/nuxtApps/nuxt-bko/node_modules/h3/dist/index.mjs:1065:7)
Using the example, but I keep getting the same error. In the example there is no reference to setting __dirname.
I'm using: node v16.16.0 Nuxt 3.2.0 Nitro 2.2.0 Formidable ^2.1.1
My composable:
my route:
the error: