You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When an image is dragged to an artist with non ISO-8859-1 characters the system hangs with "Uploading File" text
HiFiBerryOS version
20220228
HiFiBerry sound card
Digi+ Pro
To Reproduce
Steps to reproduce the behavior:
Go to 'Sources'
Click on 'Music'
Click on 'ARTISTS'
Scroll down to 'artist with non ISO-8859-1 characters (such as) Натали
Drag image to artist
Expected behavior
The upload should succeed and the artist image should update
Screenshots
Browser (if applicable)
OS: Windows
Browser [e.g. chrome, safari]: all that I tried (Edge/Chrome/Firefox/Vivaldi)
Version [e.g. 22]
Additional context
The problem arises from the fetch() function not parsing HTTP-headers with non ISO-8859-1 characters. It can be fixed by minor changes to the source code of two files:
Add a line to /opt/beocreate/beo-views/default/scripts/beo-ui.js to escape the artist before sending the request:
2163- if (canUpload) {
2164: if(options && options.customData && options.customData.artist) options.customData.artist=escape(options.customData.artist); // Ensure artist can use non ISO 8859-1 characters
2165- uploadNotifyTimeout = setTimeout(function() {
Add a line to /opt/beocreate/beo-system/beo-server.js to return the encoded text to utf-8 before processing the upload:
Describe the bug
When an image is dragged to an artist with non ISO-8859-1 characters the system hangs with "Uploading File" text
HiFiBerryOS version
20220228
HiFiBerry sound card
Digi+ Pro
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The upload should succeed and the artist image should update
Screenshots
Browser (if applicable)
Additional context
The problem arises from the
fetch()
function not parsing HTTP-headers with non ISO-8859-1 characters. It can be fixed by minor changes to the source code of two files:/opt/beocreate/beo-views/default/scripts/beo-ui.js
to escape the artist before sending the request:/opt/beocreate/beo-system/beo-server.js
to return the encoded text to utf-8 before processing the upload:The text was updated successfully, but these errors were encountered: