@fmal/http-service
Version:
A HTTP service - orignally @cerebral/http
19 lines (16 loc) • 534 B
JavaScript
import { processResponse } from '../utils';
function uploadFileFactory(urlValue, filesValue, optionsValue) {
if (optionsValue === void 0) {
optionsValue = {};
}
return function uploadFile(_ref) {
var http = _ref.http,
resolve = _ref.resolve,
path = _ref.path;
var url = resolve.value(urlValue);
var files = resolve.value(filesValue);
var options = resolve.value(optionsValue);
return processResponse(http.uploadFile(url, files, options), path);
};
}
export default uploadFileFactory;