getting error on attaching attachments
Error uploading product: TypeError: Cannot read properties of undefined (reading 'Symbol(Symbol.asyncIterator)')
on uploading attachmentbuilder[]
8 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!please share the whole error
Error uploading product: TypeError: Cannot read properties of undefined (reading 'Symbol(Symbol.asyncIterator)')
at DataResolver.resolveFile (/Users/farrel/Desktop/Code/project-website-fire_fighter/node_modules/discord.js/src/util/DataResolver.js:117:24)
at MessagePayload.resolveFile (/Users/farrel/Desktop/Code/project-website-fire_fighter/node_modules/discord.js/src/structures/MessagePayload.js:260:54)
at /Users/farrel/Desktop/Code/project-website-fire_fighter/node_modules/discord.js/src/structures/MessagePayload.js:225:85
at Array.map (<anonymous>)
at MessagePayload.resolveFiles (/Users/farrel/Desktop/Code/project-website-fire_fighter/node_modules/discord.js/src/structures/MessagePayload.js:225:56)
at TextChannel.send (/Users/farrel/Desktop/Code/project-website-fire_fighter/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:154:50)
at cdnUpload (file:///Users/farrel/Desktop/Code/project-website-fire_fighter/dist/controller/api/cdnUpload.js:36:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
sounds like one or more of
file.buffer
was undefined
file.buffer indeed is defined, because on my multer testcase it uploaded the image
please actually log
file.buffer
as you iteratejesus christ, it is undefined