0

I would like to upload a file with the react-redux-universal-hot-example boilerplate.

On submit, the function below is called (managed by the ApiClient):

export function update(data) {
  return {
    types: [UPLOAD, UPLOAD_SUCCESS, UPLOAD_FAIL],
    promise: (client) => client.post('/project/update', {
      files: data
    })
  };
}

On the server side, the following function is called (managed by the Api):

export default function update(req, params) {
  // get the file
}

Where are the file information located?

1 Answer 1

2

You need an Express middleware for handling multipart/form-data, like Multer.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.