Where to add Tinymce api key? - django

i downloaded the zip file form tinymce.cloud. and added the file in static folder everything is working fine,
except now i'm
getting this notification every time i want to create a post.
I already have an account but as they suggested to add key in tinymce.js file the content is totally different in mine because i'm not using just single js file but bunch of files now i don't know where i should put my api key. so it stop giving me notification.
script file i'm using in head file
post_create.html where i added script.

To run TinyMCE 5 from the cloud, use the following code in the head of your HTML file, replacing no-api-key with your own API key:
<script src="https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
There's more information about getting started with TinyMCE 5 on the cloud in the docs: https://www.tiny.cloud/docs/quick-start/

Related

ar.js how to create a .patt file programmatically on server?

Im using ar.js.
Trying to automatically convert an image to a .patt file for detection.
The only thing I can find is this website which automatically converts jpgs to .patt files.
https://jeromeetienne.github.io/AR.js/three.js/examples/marker-training/examples/generator.html
Even then the github is based on JS I think, so the file is generated on the client, not the server.
This tutorial even says to use the link above to create patt files.
https://medium.com/arjs/how-to-create-your-own-marker-44becbec1105
How could I programmatically create the patt files instead of manually creating them through the website. Ideally with php.
Thanks

How to updatde current URL while uploading document in SharePoint 2013 using CSOM

I am trying to change URL while uploading document to SharePoint document library using CSOM.
Description:
We have 'XYZ' document library with following folder structure:
Folder 1
SubFolder 1
- All Documents
Now I am trying to upload document at Folder 1. and after Drag and Drop document is getting uploaded to Folder 1. What I want to do here is, Whenever user try to upload document in Folder 1, it should get uploaded to SubFolder 1 . Is there any way to change URL of document in CSOM while its getting uploaded. So that it will get uploaded to 'SubFolder 1' even though user is doing DRagDrop to 'Folder 1'.
I am getting current folder URL in state.Status= Uploading event. I want to update this URL by adding 'Subfolder 1' to currentURL , so that it will upload this document direct to updated URL.
Note: If you have any other way to do it please let me know. also Cant go for Server side code. need CSOM.
Thank you in advance.
I have implemented similar requirements before and would recommend using a workflow for this. I have left out the step for getting the FormDigestValue by making a call to /_api/web/contextinfo, but that is needed in the request header.
The following URL format is used to call the API to move the document. Here is some documentation on the API.
/_api/web/getfilebyserverrelativeurl('/Folder1/file.pdf')/moveto(newurl='/Folder1/SubFolder1/file.pdf',flags=1)

How can I publish mulitple content to dotCMS through script

As I am new to dotCMS, just wondering is it support any script through which I can upload/publish my multiple contents(i.e well structured directory) as whole. For example I have multiple text files with contents to publish how can i do this in one shot ?
I know it support dynamic content page, but seems that works on already created content/page.
There are two ways:
You can either put all the content in an Excel file and use the "import content" option of the "Add new Content" button in the dotCMS admin "Content" tab. To know what the Excel structure should be, first download a piece of the content you plan to upload by clicking on the "Export button in the same page".
The second way is to use the Restfull content API. Check the documentation on how to use it.

Django file processing app

I am looking to write a Django app that is a utility.
I would like the user to be presented with a form when they can upload 4 or 5 files.
They would then be able to hit a process button and the 5 files would be processed and combine or zipped and downloaded as 1 file(result_file)
After this the 5 file would be deleted as well at the result_file
I would prefer to avoid having a database on this app as it never really stores ant information
Could all this be done in a view ? and how would you guys approach it ?
This is what I would try:
Create the script that does the file processing work.
You can place the script in a newly created folder inside the django app folder and just import it in your views.py.
You can create an empty file ,"init.py" in the aforementioned new folder, and make it as package to import it in views.py
In the same views.py, there could be another function that has the download feature .

Django - Upload file without using form

I have a small email client. I would like to be able to upload files without having to submit a form. So, I have my email form. I would like to, whenever I use the file input button on my form, that file would be uploaded without any reload of the page. The goal is to be able to upload multiple files without a reload of the page, something similar to what happens in GMail.
Every time you click the file input and choose a file, a small progress bar appears with the upload progress, and the page is not reloaded.
I am guessing some JS/Ajax library might help me achieve this? I am using HTML5.
Thank you
Blueimp has a great jQuery-based throttling file uploader.