XLS und XLSX hinzugefuegt
This commit is contained in:
parent
6b3776d3c4
commit
f259c5432c
|
|
@ -730,9 +730,7 @@ $('.droppable_div').on('dragleave', function (e) {
|
|||
currentid = e["currentTarget"]['id'];
|
||||
$("#{{parentid}}_div").removeClass('bg-secondary');
|
||||
});
|
||||
|
||||
allowedtypes = "application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, text/plain, application/pdf, image/*, image/x-png, image/gif, image/jpg, image/jpeg, image/JPEG, image/JPG, docx, JPEG, JPG, doc, odt, ODT, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
||||
|
||||
allowedtypes = "application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, text/plain, application/pdf, image/*, image/x-png, image/gif, image/jpg, image/jpeg, image/JPEG, image/JPG, docx, JPEG, JPG, doc, odt, ODT, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
|
||||
function uploadAction(filetodo, parid){
|
||||
var formData = new FormData($("#uploadFileForm")[0]);
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ def adddirbyajax(request, parent):
|
|||
uploadsource = request.POST["uploadsource"]
|
||||
# VALIDATE FILE-TYPE
|
||||
file_ext = request.FILES['uploadedfile'].name.split(".")[1]
|
||||
allowed_types = ["txt", "TXT", "png", "PNG", "jpeg", "JPEG", "jpg", "JPG", "PDF", "pdf", "csv", "CSV", "DOC", "doc", "DOCX", "docx", "ODT", "odt", "PPT", "ppt", "PPTX", "pptx"]
|
||||
allowed_types = ["txt", "TXT", "png", "PNG", "jpeg", "JPEG", "jpg", "JPG", "PDF", "pdf", "csv", "CSV", "DOC", "doc", "DOCX", "docx", "ODT", "odt", "PPT", "ppt", "PPTX", "pptx", "XLS", "xls", "XLSX", "xlsx"]
|
||||
file_ok = False
|
||||
for t in allowed_types:
|
||||
if t == file_ext:
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ $('#directdiv').on('dragleave', function (e) {
|
|||
$("#directdiv").removeClass('bg-secondary');
|
||||
});
|
||||
|
||||
allowedtypes = "application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, text/plain, application/pdf, image/*, image/x-png, image/gif, image/jpg, image/jpeg, image/JPEG, image/JPG, docx, JPEG, JPG, doc, odt, ODT, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
||||
allowedtypes = "application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, text/plain, application/pdf, image/*, image/x-png, image/gif, image/jpg, image/jpeg, image/JPEG, image/JPG, docx, JPEG, JPG, doc, odt, ODT, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
|
||||
|
||||
function uploadButtonPush(){
|
||||
|
|
@ -504,6 +504,7 @@ function uploadAction(filetodo){
|
|||
var formData = new FormData();
|
||||
formData.append("uploadedfile", filetodo);
|
||||
formData.append("uploadsource", "standards");
|
||||
console.log(filetodo.type);
|
||||
if(allowedtypes.indexOf(filetodo.type) != -1 && filetodo.type.length > 0){
|
||||
$.ajax({
|
||||
url: "{% url 'cloud-adddir' parentid %}",
|
||||
|
|
|
|||
|
|
@ -566,9 +566,7 @@ $('#directdiv').on('dragleave', function (e) {
|
|||
$("#directdiv").removeClass('bg-secondary');
|
||||
});
|
||||
|
||||
allowedtypes = "application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, text/plain, application/pdf, image/*, image/x-png, image/gif, image/jpg, image/jpeg, image/JPEG, image/JPG, docx, JPEG, JPG, doc, odt, ODT, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
||||
|
||||
|
||||
allowedtypes = "application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, text/plain, application/pdf, image/*, image/x-png, image/gif, image/jpg, image/jpeg, image/JPEG, image/JPG, docx, JPEG, JPG, doc, odt, ODT, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
|
||||
function uploadButtonPush(){
|
||||
$("#uploadedfile").click();
|
||||
|
|
|
|||
Loading…
Reference in New Issue