constructor(){
super()
state = {
newsInfo: [],
idCatSame: 0,
isLoading: true
}
}
let formData = new FormData()
getState().photoReport.photos.map((el, ind) => {
formData.append("files", {
uri: el.uri,
type: "image/jpeg",
filename: el.uri.replace(/^.*[\\\/]/, ""),
name: el.uri.replace(/^.*[\\\/]/, ""),
})
})
axios.post(`${API_ROOT}/api/Tasks/PhotoReport`,
formData,
{
headers: {
Accept: "application/json",
"Content-Type": "multipart/form-data",
Authorization: "Bearer " + getState().auth.token,
},
}
)
return (<div>{ this.state.loadworksheep ? <worksheetLoaderPage />: <startPage /> }</div>);