2017-02-27 59 views
0

我想用react-redux-universal-hot-example樣板文件上傳文件。通過API調用使用reactmmx文件上傳

在提交,該函數以下稱爲(由ApiClient管理):

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

在服務器端,下面的函數被調用(由Api管理):

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

文件信息位於何處?

回答

2

您需要Express中間件來處理多部分/表單數據,如Multer