fix: playlist cover upload — send raw image body not multipart
Navidrome expects Content-Type: image/* with raw binary body. Bump SW to ns-v34. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
1c59b4eccd
commit
16f4f03474
2 files changed
+4
-3
No files matched your search
@@ -506,9 +506,10 @@ async function editPlCoverSelected(input){
|
||||
document.getElementById('edit-pl-cover').innerHTML=`<img src="${preview}" style="width:100%;height:100%;object-fit:cover">`;
|
||||
try{
|
||||
const token=await ndAuth();
|
||||
const form=new FormData();form.append('image',file);
|
||||
const res=await fetch(`${cfg.url}/api/playlist/${_currentPlaylist.id}/image`,{
|
||||
method:'POST',headers:{'X-Nd-Authorization':'Bearer '+token},body:form
|
||||
method:'POST',
|
||||
headers:{'X-Nd-Authorization':'Bearer '+token,'Content-Type':file.type||'image/jpeg'},
|
||||
body:file
|
||||
});
|
||||
if(!res.ok)throw new Error(res.status);
|
||||
toast('Cover aktualisiert');
|
||||
|
||||
Reference in new issue
Block a user