From e98b158886939cd3439b18307361c6f8a8cfae46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 3 Nov 2016 14:04:40 +0100 Subject: [PATCH] Disabled auto-slug feature. It broke file uploads. Thanks @venomgfx for joining in solving this. --- src/scripts/file_upload.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripts/file_upload.js b/src/scripts/file_upload.js index 66a32da5..62905eab 100644 --- a/src/scripts/file_upload.js +++ b/src/scripts/file_upload.js @@ -105,7 +105,8 @@ function setup_file_uploader(index, upload_element) { var filename = data.files[0].name; // Set the slug based on the name, strip special characters - $('#' + $(this).attr('data-field-slug')).val(filename.replace(/[^0-9a-zA-Z]+/g, "")); + // TODO: fix this so that it doesn't set the wrong field. + // $('#' + $(this).attr('data-field-slug')).val(filename.replace(/[^0-9a-zA-Z]+/g, "")); // Ugly workaround: If the asset has the default name, name it as the file if ($('.form-group.name .form-control').val() == 'New asset') {