CODEX - More changes to the binary files, listing and storing
This commit is contained in:
@@ -557,11 +557,12 @@ export default function MelodyDetail() {
|
||||
|
||||
const handleDownload = async (e) => {
|
||||
e.preventDefault();
|
||||
const preferredUrl = melody?.id ? `/api/melodies/${melody.id}/download/binary` : binaryUrl;
|
||||
try {
|
||||
const token = localStorage.getItem("access_token");
|
||||
let res = null;
|
||||
try {
|
||||
res = await fetch(binaryUrl, {
|
||||
res = await fetch(preferredUrl, {
|
||||
headers: token ? { Authorization: `Bearer ${token}` } : {},
|
||||
});
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user