mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-25 06:26:28 +08:00
Add timestap to bypass Chrome cache for TinyMCE images [SCI-9597]
This commit is contained in:
parent
c1e3472d46
commit
6dd917552e
1 changed files with 6 additions and 0 deletions
6
app/javascript/packs/tiny_mce.js
vendored
6
app/javascript/packs/tiny_mce.js
vendored
|
@ -205,6 +205,12 @@ window.TinyMCE = (() => {
|
|||
cache_suffix: '?v=6.5.1-19', // This suffix should be changed any time library is updated
|
||||
selector,
|
||||
skin: false,
|
||||
editimage_fetch_image: img => new Promise((resolve) => {
|
||||
// Appending a timestamp to an image URL bypasses Chrome’s cache, resolving occasional CORS errors
|
||||
fetch(img.src + '?t=' + new Date().getTime())
|
||||
.then(response => response.blob())
|
||||
.then(blob => resolve(blob));
|
||||
}),
|
||||
content_css: false,
|
||||
content_style: contentStyle,
|
||||
convert_urls: false,
|
||||
|
|
Loading…
Add table
Reference in a new issue