N
N
Nonprogrammer2016-04-13 16:31:54
PHP
Nonprogrammer, 2016-04-13 16:31:54

Why is the name of the file uploaded to the site deleted if the name is written in Cyrillic (only the extension without a dot remains)?

I am writing a small website in Python/Bottle. On one page, users upload a file. If the file name is written in English (for example.docx), then the file name is displayed normally. But if the name is in Cyrillic (for example.docx), then everything except docx is deleted.
1. naprimer.docx
2. eg.docx

@route('/upload', method="post")
def getPage():
    upload=request.POST['upload']
    return(upload.filename)
#1. upload.filename=naprimer.docx
#2. upload.filename=docx

How to upload files with a Russian name?
UPD: It is important that the title of the document be preserved along with the document.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question