how to refresh tinymce image_list dropdown - tinymce-6

How to refresh the image_list? I have in the tinymce init:
image_list: masterImageList that references an existing external image store.
When the file picker is opened, the masterImageList loads and contains the existing Images.
After uploading an image, I'd like to refresh the list (masterImageList) so that the newly uploaded image appears there. the users may choose to upload multiple images before consuming them in the editor.

Options configured in tinymce.init (including image_list) cannot be changed after the editor is initialized. To change these options, you would have to destroy and reinitialize the editor.
https://www.tiny.cloud/docs/tinymce/6/apis/tinymce.editor/#destroy

Related

How can I download an image from a webpage that creates a new image on each load

I sent a request for a website and on that website is a captcha image (the text ones) and I wanted to be able to download the image directly from the webpage. However, when I attempt to save the image (manually), a completely different one is downloaded instead. All the images share the same URL.
Url: https://www.unovarpg.com/library/captcha/captcha.php?.png
There are a few things that will give me the correct image, however:
Dragging and dropping the image directly to my file manager
going in the Sources tab in inspect element and saving from there (it downloads it as .php but changing the extension to .png works)
copying the image as data URI in Sources tab
copying the image request response in the Network tab

Insert protected image in Jodit

I'm using Jodit 3.18.9 with
ace 1.4.12
js-beautify 1.13.0
with uploader configs allowing to upload images separately from text into DB.
Once the image is uploaded, we use .insertImage(xxx) to add images into jodit editor. In this case, if we want to protect uploaded files, we may need to generate and attach a temp token to the url.
My question is, without doing some custom implementations (such as doing http requests for each image to get contents, and replace links with their base64 contents), is there some 'official' supports to do a get (image) query with jwt token or not ?
thanks a lot

Is image or file being always downloaded from Google Cloud Storage on click?

Please help me to understand the following, I have a node.js app which I want to run on Google Cloud App Engine, this app will contain some images which are planned to be stored on Google Cloud Storage. On my sample app once I upload an image and get a url (mediaLink or selfLink) image is being downloaded.
Why is that? Each download each click costs money I understand google, but is there any way to make url just show images NOT to be downloaded?
Saving a file from Google Cloud Storage is the same as displaying it. Both action require transferring the content of the image to the device for display or saving.
The action of displaying an image or popping up a save as dialog is controlled by HTTP headers. For example if you have the HTTP header content-type set incorrectly (not as an image) then some browsers will save the file. If you want your image files to be displayed as images set the headers correctly for the type of picture. For PNG files set the header contenty-type: image/png.
You can also force a download with the content-disposition: attachment header.
In summary, it does not matter if you are displaying an image or saving it to local storage, it will cost you money. Both actions requiring downloading (transferring) the contents of the file across the Internet.

Export Nedb contents

I have an electron app that acts as a tool to speed up game development. When a user opens the app they can begin importing assets and setting custom properties. I store these properties in nedb. The way I have my application set up, every page change the properties from nedb are fetched and are immediately reflected on the page. I need to save these changes in a file the app can load and it would be intuitive to use nedb since it loads database info from a file optionally out of the box. However in the instance a user opens my app and begins working without a file, I have no way to store these changes for later use. I have found no docs for exporting the database on the fly.

CF and PDF in secure environment

I'm using CF9. My problem pertains to an admin application that sets session variables at login to identify the user and user permissions. Depending on the user level, certain pages are allowed for viewing and other pages are not allowed. (I'll refer to this as my 'security framework'. This is wrapped around everything in the root.)
This security framework consists of a cfif statement at the top of the CFM page and a closing cfelse and (</)cfif at the bottom of the page. Everything between this opening cfif and closing cfif displays if the user has that level permission - standard stuff.
Certain users can upload PDF files, no problem here. PDF files are uploaded to a folder outside of the root and then moved and renamed to folders inside the root.
When uploading, the user chooses categories and subcategories etc. and these variables are inserted in a SQL database during the upload process. Therefore, I have filePaths and fileNames, etc. to set up dynamic links on a page for a user to click and load the PDF (password protected) in the browser.
I have the dynamic link pointing to a ShowThisPDF.cfm? with URL variables filePath= #filePath# & fileName = #fileName#. I've set up the ShowThisPDF.cfm with the security framework at the top and bottom of the page and am trying to copy the uploaded PDF into this page so that the PDF will display in the browser.
I've tried many ways to do this with cfdocument and cfpdf and cfcontent, etc. When I read the error that this is throwing, it does look like it is reaching the uploaded file but I get an "access denied" every time, due to the security framework I suppose.
On a side note, elsewhere in this application I can create a PDF from my cf pages with cfdocument with the security framework wrapped around the page and this works perfectly - displaying the PDF in the browser. My problem is in loading an existing PDF into a CFM page that has the security framework - which should allow the PDF to load.
Anyone have an idea as to how I can accomplish the above? I hate to try and bypass my security and it seems logical to "copy" the uploaded PDF into a CFM page that wraps the PDF in the security framework and then display the PDF in the browser.
Agree with Dan - I had similar issue. So I ended up doing https: with a windows login and also a ColdFusion Login to Web Application. At end of day - they need 2 logins to get into the system - then they can see the pdf files etc or what they need.

Resources