use base32 skylink domain for app uploads

This commit is contained in:
Karol Wypchlo 2021-04-08 14:23:13 +02:00
parent b42fc4e386
commit 05415d5955
1 changed files with 3 additions and 1 deletions

View File

@ -197,7 +197,9 @@ const Uploader = () => {
response = await client.uploadFile(file, { onUploadProgress });
}
onFileStateChange(file, { status: "complete", url: client.getSkylinkUrl(response.skylink) });
const url = client.getSkylinkUrl(response.skylink, { subdomain: mode === "directory" });
onFileStateChange(file, { status: "complete", url });
} catch (error) {
if (error.response && error.response.status === StatusCodes.TOO_MANY_REQUESTS) {
onFileStateChange(file, { progress: -1 });