Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13891

Select non-image file in Django ckeditor browser

$
0
0

I previously uploaded a zip file from django_ckeditor, and I want to create a link to that file.
So I clicked the "link" button (or Ctrl-K), and then selected the "browse server" button to select my file.

However, when I select the file, I see no button to select the file, and the preview pane kept spinning:failed to load file

But when an image is selected, I'm able to select the "Embed image" button:enter image description here

Relative Django setting:

CKEDITOR_UPLOAD_PATH = "public/"CKEDITOR_UPLOAD_SLUGIFY_FILENAME = FalseCKEDITOR_RESTRICT_BY_USER = FalseCKEDITOR_RESTRICT_BY_DATE = FalseCKEDITOR_FILENAME_GENERATOR = 'util.func.ckupload_name'CKEDITOR_CONFIGS = {'default': {'toolbar': 'full',            }        }
def ckupload_name(fname, request):    return f'{uuid.uuid4()}/{fname}'

It looks like the image functionality, but I'm sure I'm opening this box using the "link" feature.
Because the files are uploaded to a random folder, I cannot manually enter the link easily. (I verified that if I found the UUID part, I can download the file from web)

If I right click the broken image icon and select "copy image url", I can get the link. But since that would be too difficult for other users in my organization, I'm looking for a more straight forward way to get the link.


Viewing all articles
Browse latest Browse all 13891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>