plugin update(wp-media-folder)
This commit is contained in:
@@ -536,7 +536,10 @@ const PDFViewerApplication = {
|
||||
const queryString = document.location.search.substring(1);
|
||||
const params = (0, _ui_utils.parseQueryString)(queryString);
|
||||
file = params.get("file") ?? _app_options.AppOptions.get("defaultUrl");
|
||||
validateFileURL(file);
|
||||
var checkValidateFileURL = validateFileURL(file);
|
||||
if (checkValidateFileURL === 'error_loading') {
|
||||
file = wpmf_pdf_embed_obj.errorLoadingPdf;
|
||||
}
|
||||
const fileInput = appConfig.openFileInput;
|
||||
fileInput.value = null;
|
||||
fileInput.addEventListener("change", function (evt) {
|
||||
@@ -1646,12 +1649,7 @@ exports.PDFViewerApplication = PDFViewerApplication;
|
||||
throw new Error("file origin does not match viewer's");
|
||||
}
|
||||
} catch (ex) {
|
||||
PDFViewerApplication.l10n.get("loading_error").then(msg => {
|
||||
PDFViewerApplication._documentError(msg, {
|
||||
message: ex?.message
|
||||
});
|
||||
});
|
||||
throw ex;
|
||||
return 'error_loading';
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user