mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
Workaround for file upload problem when the file name contains Umlaute (seems to be a Linux only issue, fixes #1382)
This commit is contained in:
@@ -96,7 +96,7 @@ $('.save-product-button').on('click', function(e)
|
||||
if ($("#product-picture")[0].files.length > 0)
|
||||
{
|
||||
var someRandomStuff = Math.random().toString(36).substring(2, 100) + Math.random().toString(36).substring(2, 100);
|
||||
jsonData.picture_file_name = someRandomStuff + $("#product-picture")[0].files[0].name;
|
||||
jsonData.picture_file_name = someRandomStuff + CleanFileName($("#product-picture")[0].files[0].name);
|
||||
}
|
||||
|
||||
const location = $(e.currentTarget).attr('data-location') == 'return' ? '/products?product=' : '/product/';
|
||||
|
Reference in New Issue
Block a user