@@ -15707,6 +15707,7 @@ return /******/ (function(modules) { // webpackBootstrap
15707
15707
return this.document.defaultValue;
15708
15708
},
15709
15709
set: function set(defaultValue) {
15710
+
15710
15711
if (typeof defaultValue === 'string') {
15711
15712
supportedStringDataTypes = ['Text', 'EncryptedText', 'DateTime'];
15712
15713
if (supportedStringDataTypes.indexOf(this.document.dataType) > -1) {
@@ -16959,19 +16960,22 @@ return /******/ (function(modules) { // webpackBootstrap
16959
16960
CloudFiles
16960
16961
*/
16961
16962
16962
- _CB2.default.CloudFile = _CB2.default.CloudFile || function (file, data, type) {
16963
-
16963
+ _CB2.default.CloudFile = _CB2.default.CloudFile || function (file, data, type, path ) {
16964
+ if (!path) path = '/home';
16964
16965
if (Object.prototype.toString.call(file) === '[object File]' || Object.prototype.toString.call(file) === '[object Blob]') {
16965
16966
16966
16967
this.fileObj = file;
16967
16968
this.document = {
16968
16969
_id: null,
16969
16970
_type: 'file',
16970
16971
ACL: new _CB2.default.ACL(),
16971
- name: file && file.name && file.name !== "" ? file.name : 'unknown ',
16972
+ name: file && file.name && file.name !== "" ? file.name : 'default.file ',
16972
16973
size: file.size,
16973
16974
url: null,
16974
16975
expires: null,
16976
+ path: path,
16977
+ updatedAt: Date.now(),
16978
+ createdAt: Date.now(),
16975
16979
contentType: typeof file.type !== "undefined" && file.type !== "" ? file.type : 'unknown'
16976
16980
};
16977
16981
} else if (typeof file === "string") {
@@ -16985,6 +16989,9 @@ return /******/ (function(modules) { // webpackBootstrap
16985
16989
size: '',
16986
16990
url: file,
16987
16991
expires: null,
16992
+ path: path,
16993
+ updatedAt: Date.now(),
16994
+ createdAt: Date.now(),
16988
16995
contentType: ''
16989
16996
};
16990
16997
} else {
@@ -17000,6 +17007,9 @@ return /******/ (function(modules) { // webpackBootstrap
17000
17007
name: file,
17001
17008
size: '',
17002
17009
url: null,
17010
+ path: path,
17011
+ updatedAt: Date.now(),
17012
+ createdAt: Date.now(),
17003
17013
expires: null,
17004
17014
contentType: type
17005
17015
};
@@ -17036,9 +17046,6 @@ return /******/ (function(modules) { // webpackBootstrap
17036
17046
Object.defineProperty(_CB2.default.CloudFile.prototype, 'size', {
17037
17047
get: function get() {
17038
17048
return this.document.size;
17039
- },
17040
- set: function set(size) {
17041
- this.document.size = size;
17042
17049
}
17043
17050
});
17044
17051
@@ -17051,6 +17058,26 @@ return /******/ (function(modules) { // webpackBootstrap
17051
17058
}
17052
17059
});
17053
17060
17061
+ Object.defineProperty(_CB2.default.CloudFile.prototype, 'path', {
17062
+ get: function get() {
17063
+ return this.document.path;
17064
+ },
17065
+ set: function set(path) {
17066
+ this.document.path = path;
17067
+ }
17068
+ });
17069
+
17070
+ Object.defineProperty(_CB2.default.CloudFile.prototype, 'createdAt', {
17071
+ get: function get() {
17072
+ return this.document.createdAt;
17073
+ }
17074
+ });
17075
+
17076
+ Object.defineProperty(_CB2.default.CloudFile.prototype, 'updatedAt', {
17077
+ get: function get() {
17078
+ return this.document.updatedAt;
17079
+ }
17080
+ });
17054
17081
/**
17055
17082
* Uploads File
17056
17083
*
@@ -17068,7 +17095,7 @@ return /******/ (function(modules) { // webpackBootstrap
17068
17095
17069
17096
var thisObj = this;
17070
17097
17071
- if (!this.fileObj && !this.data) throw "You cannot save a file which is null";
17098
+ if (!this.fileObj && !this.data && this.type != 'folder' ) throw "You cannot save a file which is null";
17072
17099
17073
17100
if (!this.data) {
17074
17101
var params = new FormData();
@@ -17099,11 +17126,7 @@ return /******/ (function(modules) { // webpackBootstrap
17099
17126
});
17100
17127
} else {
17101
17128
var data = this.data;
17102
- var params = JSON.stringify({
17103
- data: data,
17104
- fileObj: _CB2.default.toJSON(this),
17105
- key: _CB2.default.appKey
17106
- });
17129
+ var params = JSON.stringify({ data: data, fileObj: _CB2.default.toJSON(this), key: _CB2.default.appKey });
17107
17130
var url = _CB2.default.apiUrl + '/file/' + _CB2.default.appId;
17108
17131
var uploadProgressCallback = null;
17109
17132
@@ -17151,11 +17174,7 @@ return /******/ (function(modules) { // webpackBootstrap
17151
17174
}
17152
17175
var thisObj = this;
17153
17176
17154
- var params = JSON.stringify({
17155
- fileObj: _CB2.default.toJSON(thisObj),
17156
- key: _CB2.default.appKey,
17157
- method: "PUT"
17158
- });
17177
+ var params = JSON.stringify({ fileObj: _CB2.default.toJSON(thisObj), key: _CB2.default.appKey, method: "PUT" });
17159
17178
var url = _CB2.default.apiUrl + '/file/' + _CB2.default.appId + '/' + this.document._id;
17160
17179
17161
17180
_CB2.default._request('PUT', url, params).then(function (response) {
@@ -17189,9 +17208,7 @@ return /******/ (function(modules) { // webpackBootstrap
17189
17208
def = new _CB2.default.Promise();
17190
17209
}
17191
17210
17192
- var params = JSON.stringify({
17193
- key: _CB2.default.appKey
17194
- });
17211
+ var params = JSON.stringify({ key: _CB2.default.appKey });
17195
17212
var url = this.url;
17196
17213
17197
17214
_CB2.default._request('GET', url, params).then(function (response) {
@@ -19759,11 +19776,6 @@ return /******/ (function(modules) { // webpackBootstrap
19759
19776
}
19760
19777
19761
19778
this.query[columnName] = data;
19762
- //}else{
19763
-
19764
- //This is for people who code : obj.equalTo('column', null);
19765
- // this.doesNotExists(columnName);
19766
- // }
19767
19779
19768
19780
return this;
19769
19781
}
@@ -19827,10 +19839,6 @@ return /******/ (function(modules) { // webpackBootstrap
19827
19839
this.query[columnName] = {
19828
19840
$ne: data
19829
19841
};
19830
- //else{
19831
- //This is for people who code : obj.notEqualTo('column', null);
19832
- // this.exists(columnName);
19833
- // }
19834
19842
19835
19843
return this;
19836
19844
}
0 commit comments