Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts: # src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js # src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js # src/Umbraco.Web.UI.Client/src/views/components/upload/umb-file-dropzone.html
This commit is contained in:
@@ -213,7 +213,15 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
|
||||
return;
|
||||
}
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
const blob = blobInfo.blob();
|
||||
|
||||
// if the file size is greater than the max file size, reject it
|
||||
if (fileManager.maxFileSize > 0 && blob.size > fileManager.maxFileSize) {
|
||||
failure(`The file size (${blob.size / 1000} KB) exceeded the maximum allowed size of ${fileManager.maxFileSize / 1000} KB.`);
|
||||
return;
|
||||
}
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', Umbraco.Sys.ServerVariables.umbracoUrls.tinyMceApiBaseUrl + 'UploadImage');
|
||||
|
||||
xhr.onloadstart = function () {
|
||||
|
||||
@@ -52,15 +52,15 @@
|
||||
|
||||
<li class="file" ng-repeat="file in processed track by file.key">
|
||||
|
||||
<div class="file-description">
|
||||
<div>
|
||||
<span>{{ file.name }}</span>
|
||||
<span ng-if="file.messages.length > 0 || file.$error" class="file-messages">
|
||||
<span class="errorMessage color-red" ng-repeat="message in ::file.messages" ng-if="message.message">{{::message.header}}: {{::message.message}}</span>
|
||||
<span ng-if="file.$error === 'pattern'" class="errorMessage color-red"><localize key="media_disallowedFileType"></localize></span>
|
||||
<span ng-if="file.$error === 'maxSize'" class="errorMessage color-red"><localize key="media_maxFileSize"></localize> "{{maxFileSize}}"</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="file-description">
|
||||
<div>
|
||||
<span>{{ file.name }}</span>
|
||||
<span ng-if="file.messages.length > 0 || file.$error" class="file-messages">
|
||||
<span class="errorMessage color-red" ng-repeat="message in ::file.messages">{{::message.message}}</span>
|
||||
<span ng-if="file.$error === 'pattern'" class="errorMessage color-red"><localize key="media_disallowedFileType"></localize></span>
|
||||
<span ng-if="file.$error === 'maxSize'" class="errorMessage color-red"><localize key="media_maxFileSize"></localize> "{{maxFileSize}}"</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- upload success -->
|
||||
<span ng-if="file.messages.length === 0">
|
||||
|
||||
Reference in New Issue
Block a user