@fmal/http-service
Version:
A HTTP service - orignally @cerebral/http
26 lines (21 loc) • 667 B
JavaScript
;
exports.__esModule = true;
exports.default = void 0;
var _utils = require("../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 (0, _utils.processResponse)(http.uploadFile(url, files, options), path);
};
}
var _default = uploadFileFactory;
exports.default = _default;
module.exports = exports.default;