diff --git a/app.js b/app.js index 0622766..59a13f9 100644 --- a/app.js +++ b/app.js @@ -506,9 +506,10 @@ async function editPlCoverSelected(input){ document.getElementById('edit-pl-cover').innerHTML=``; 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'); diff --git a/sw.js b/sw.js index 9b7648d..10022b7 100644 --- a/sw.js +++ b/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'ns-v33'; +const CACHE = 'ns-v34'; const PRECACHE = ['/', 'index.html', 'styles.css', 'app.js', 'manifest.json', 'icon.svg']; const SKIP_PATHS = ['/rest/stream', '/rest/download', '/config.js'];