Mattthew commited on
Commit
508cf12
1 Parent(s): 5520e92

now with encodeURI(src.normalize("NFD"))

Browse files

hopefully fixing file path encoding for accent characters

Files changed (1) hide show
  1. index.js +2 -0
index.js CHANGED
@@ -115,6 +115,8 @@ function insertArtists() {
115
  } else {
116
  src += first.replaceAll(' ', '_') + '_' + last.replaceAll(' ', '_');
117
  }
 
 
118
  imgBox.appendChild(imgArtwork);
119
  imgBox.appendChild(imgPortrait);
120
  imgBox.appendChild(imgLandscape);
 
115
  } else {
116
  src += first.replaceAll(' ', '_') + '_' + last.replaceAll(' ', '_');
117
  }
118
+ // files use accented characters and huggingface stores the files with this encoding
119
+ src = encodeURI(src.normalize("NFD"));
120
  imgBox.appendChild(imgArtwork);
121
  imgBox.appendChild(imgPortrait);
122
  imgBox.appendChild(imgLandscape);