ownfiles
Version:
A library to manage files in a Solid User's Pod
14 lines • 515 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.update = void 0;
const mime_1 = require("mime");
exports.update = function (resource, content, contentType = 'text/turtle') {
var _a;
if (mime_1.getType(resource))
contentType = (_a = mime_1.getType(resource)) !== null && _a !== void 0 ? _a : contentType;
return this.fetcher.webOperation('PUT', resource, {
data: content,
contentType: contentType,
});
};
//# sourceMappingURL=update.js.map