refactor: support new Autumn url scheme

This commit is contained in:
izzy
2025-08-31 18:02:16 +02:00
parent 37267bb829
commit 2f0f931b1a
+18 -7
View File
@@ -59,19 +59,30 @@ export class File {
/**
* Direct URL to the file
*/
get url(): string {
return `${this.#client.configuration?.features.autumn.url}/${this.tag}/${
this.id
}/${this.filename}`;
// get url(): string {
// if (!this.filename) return this.previewUrl;
//
// return `${this.#client.configuration?.features.autumn.url}/${this.tag}/${
// this.id
// }/${this.filename}`;
// }
/**
* Preview URL for the file
*/
get previewUrl(): string {
return `${this.#client.configuration?.features.autumn.url}/${
this.tag
}/${this.id}`;
}
/**
* Download URL for the file
* Original download URL for the file
*/
get downloadURL(): string {
get originalUrl(): string {
return `${this.#client.configuration?.features.autumn.url}/${
this.tag
}/download/${this.id}/${this.filename}`;
}/${this.id}/original`;
}
/**