@widgetic/editor 3.10.43 → 3.10.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dev/editor.js +14 -6
- package/lib/editor.js +1 -1
- package/package.json +1 -1
- package/src/core/services/uploads.js +14 -5
package/lib/dev/editor.js
CHANGED
|
@@ -13347,7 +13347,7 @@ WidgetEditor = (function(superClass) {
|
|
|
13347
13347
|
this.el.append(this.tabs.el);
|
|
13348
13348
|
LoginPopup.place(this.el);
|
|
13349
13349
|
Blogvio.pubsub.subscribe('api/token/update', this._updateLoggedInStatus);
|
|
13350
|
-
this.el.attr('editorVersion', "3.10.
|
|
13350
|
+
this.el.attr('editorVersion', "3.10.45");
|
|
13351
13351
|
}
|
|
13352
13352
|
|
|
13353
13353
|
|
|
@@ -16683,13 +16683,17 @@ var UploadService = function (_EventsMixin) {
|
|
|
16683
16683
|
var _this = _possibleConstructorReturn(this, (UploadService.__proto__ || Object.getPrototypeOf(UploadService)).call(this));
|
|
16684
16684
|
|
|
16685
16685
|
_this.user = user.id;
|
|
16686
|
-
_this.maxFilesize = user.premium ? 250 : 100;
|
|
16687
16686
|
_this.token = token;
|
|
16688
16687
|
|
|
16689
|
-
_this.files = [];
|
|
16690
16688
|
_this.refreshed = {};
|
|
16691
16689
|
|
|
16692
|
-
_this.
|
|
16690
|
+
_this.files = [];
|
|
16691
|
+
// max file size in MB
|
|
16692
|
+
_this.maxFilesize = user.premium ? 250 : 25; // MB limit / file for premium / free
|
|
16693
|
+
|
|
16694
|
+
// max quota in bytes
|
|
16695
|
+
_this.quota = 250 * 1000 * 1000; // 250 MB total quota for free users
|
|
16696
|
+
// used quota in bytes
|
|
16693
16697
|
_this.used = 0;
|
|
16694
16698
|
|
|
16695
16699
|
_this.events = ['update', 'complete'];
|
|
@@ -16756,7 +16760,9 @@ var UploadService = function (_EventsMixin) {
|
|
|
16756
16760
|
var response = JSON.parse(uploadFile.xhr.response);
|
|
16757
16761
|
|
|
16758
16762
|
var id = response.files.data[0].id;
|
|
16759
|
-
|
|
16763
|
+
|
|
16764
|
+
// read quota from response
|
|
16765
|
+
// this.quota = response.quota.max;
|
|
16760
16766
|
this.used = response.quota.used;
|
|
16761
16767
|
|
|
16762
16768
|
this._update(uploadFile, function (f) {
|
|
@@ -16839,7 +16845,9 @@ var UploadService = function (_EventsMixin) {
|
|
|
16839
16845
|
headers: this.getAuthHeaders()
|
|
16840
16846
|
}).then(function (response) {
|
|
16841
16847
|
_this3.refreshed[type] = true;
|
|
16842
|
-
|
|
16848
|
+
|
|
16849
|
+
// read quota from response
|
|
16850
|
+
// this.quota = response.quota.max;
|
|
16843
16851
|
_this3.used = response.quota.used;
|
|
16844
16852
|
|
|
16845
16853
|
return response.files.data.map(function (file) {
|