mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Allow non-ASCII characters in file names of uploaded files (closes #2484)
This commit is contained in:
@@ -40,8 +40,7 @@ $('.save-recipe').on('click', function(e)
|
||||
|
||||
if ($("#recipe-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 + CleanFileName($("#recipe-picture")[0].files[0].name);
|
||||
jsonData.picture_file_name = RandomString() + CleanFileName($("#recipe-picture")[0].files[0].name);
|
||||
}
|
||||
|
||||
const location = $(e.currentTarget).attr('data-location') == 'return' ? '/recipes?recipe=' : '/recipe/';
|
||||
|
Reference in New Issue
Block a user