17 Replies
This is what you’re looking for: https://muffinman.io/blog/uploading-files-using-fetch-multipart-form-data/
You can always type the same in google, you’ll get an answer 100%
I tried some stuff and did not get it to work so I asked. Might come back.
Alright sure, but with such easy queries at least try lol. Mdn is a great place to start
Alright so got it to work.
What if I want to send more files at once though. 🤔
should be possible somehow
more files in the same form field?
what does the server expect?
Discord Developer Portal
Discord Developer Portal — API Docs for Bots and Developers
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
oh, then I guess
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
filesystem based blobs are not supported, but you can read the files into memory
that's only an issue if the files are huge
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
For my use case it will just be long strings converted to Blobs so I should be fine with that.
if the server is expecting files, they might need a filename and a mime type
but if you're building the blobs yourself, ok
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
well, if you don't specify the mime type it gets set to the empty string
because multipart/form-data file fields must have a mime type header
but anyway
got it to work. Thanks for the help 👍