Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shimono committed Nov 3, 2019
1 parent f9963a2 commit d13ffd7
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/main/resources/js-lib/personium-dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,14 +632,13 @@ _p.Webdav.prototype.getStream = function(path) {
_p.Webdav.prototype.put = function(param, contentType, data, etag) {
if (typeof param == 'string') {
try {
this.core.put(param, contentType, "UTF-8", data, etag?etag:"*");
this.core.put(param, contentType, "UTF-8", data, etag);
} catch (e) {
throw new _p.PersoniumException(e.message);
}
} else {
if ((param.path) && (param.contentType) && (param.data)) {
param.charset = param.charset?param.charset:"UTF-8";
param.etag = param.etag?param.etag:"*";
try {
this.core.put(param.path, param.contentType, param.charset, param.data, param.etag);
} catch (e) {
Expand All @@ -650,6 +649,22 @@ _p.Webdav.prototype.put = function(param, contentType, data, etag) {
}
}
};
_p.Webdav.prototype.createFile = function(param, contentType, data) {
if (typeof param == 'string') {
this.put(param, contentType, data, null);
} else {
param.etag = null;
this.put(param);
}
};
_p.Webdav.prototype.forceUpdate = function(fileName, contentType, data) {
if (typeof param == 'string') {
this.put(fileName, contentType, data, "*");
} else {
param.etag = "*";
this.put(param);
}
};

/**
* 指定Pathのデータを削除.<br>
Expand Down

0 comments on commit d13ffd7

Please sign in to comment.