function uploadBook(files) {
var data = new FormData()
files.forEach(function(file){
data.append('file[]', file)
})
const requestOptions = {
method: 'POST',
headers: authHeader(),
body: data
};
return fetch(apiUrl + '/books', requestOptions)
.then(handleResponse, handleError)
.then(files => {
return files;
});
}