E
E
Evgeny Zapunny2021-07-19 16:23:18
JavaScript
Evgeny Zapunny, 2021-07-19 16:23:18

I can't pass FormData to Electron js, how to do it right?

There is an application on electron and react, I am writing a chat, I need to add functionality for transferring a file. All the work with the api is still happening in the main.js file.
When passing a file via formdata to main.js , an empty object is received.
How to properly organize the transfer of a file from renderer.js to main.js?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2021-07-19
@evgzap

In main.js, send the path to the file. And from there, read its contents.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question