4
4
46kvolamak2021-07-09 06:28:53
React
46kvolamak, 2021-07-09 06:28:53

How to send front-end generated pdf to react server?

I am generating a pdf on the front using the react-pdf lib, I need to make it so that when you click on the download button, the pdf file is simultaneously downloaded and sent to the server for storage. Problems with sending to the server, there is very little information on the Internet, plus there is not a word about it in the react-pdf docs.

UPD
understood that it is possible to send a file after downloading (locally), but are there other ways, for example, via a blob like that, because when generating a pdf file, it also appears on the front,

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-07-09
@Aetae

Just like without React. The Internet is full of information.
The modern solution is to use FormData .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question