Drozzy
Drozzy

Reputation: 71

react filepond to upload files to same server

Need help uploading files to production. Followup instructions from https://github.com/pqina/react-filepond

On uploading the file, I get error- POST http://localhost:3000/ 404 (Not Found) filepond.js:2608

I believe it is expecting some kinda of server to run and trigger upload. Please advise how can I upload files using filepond plugin. Also, how to make it run on production? For reactjs application, we just npm build and push the build files. Is there a action for uploading to production?

Upvotes: 1

Views: 1552

Answers (1)

Rik
Rik

Reputation: 3606

The default React example will post multipart form data (file objects) to "/api". If you set up a server at that location following the guidelines in the server docs it should function correctly.

You can also use the server files used in the PHP boilerplate example:

Upvotes: 1

Related Questions