E
E
Evgeny Petrov2020-07-28 10:09:29
JavaScript
Evgeny Petrov, 2020-07-28 10:09:29

How to make download via direct link in React?

Hello!

I have a React app that generates a download link for a file and sends it to the client. The client must follow the link and download. But, the problem is that any route goes to the application (essentially correct), but how to set up a separate directory for direct links? React was created in create-react-app. I'm guessing I need to make webpack tweaks, but I can't find a solution yet.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Petrov, 2020-07-28
@kazsat

In general, he blunted himself. After all, I have two servers, one for the node, the other for the react. The path pointed to a server with a react, although it was necessary to a server with a node

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question