Working webdav backend!
This commit is contained in:
parent
7065247277
commit
d747830384
@ -96,7 +96,7 @@ export class WebDAVService implements StorageProvider {
|
||||
|
||||
return {
|
||||
key: finalKey,
|
||||
url: `${this.basePath}/${finalKey}`,
|
||||
url: `${this.config.url}${this.basePath}/${finalKey}`,
|
||||
size: file.length,
|
||||
contentType,
|
||||
};
|
||||
@ -172,8 +172,8 @@ export class WebDAVService implements StorageProvider {
|
||||
*/
|
||||
async getPresignedUrl(key: string, expiresIn: number = 3600): Promise<string> {
|
||||
// WebDAV doesn't support presigned URLs, so we return a direct URL
|
||||
// In a real implementation, you might want to implement token-based access
|
||||
const baseUrl = (this.client as any).getURL?.() || (this.client as any).toString() || this.config.url;
|
||||
// Use the config URL directly since WebDAV client doesn't expose getURL()
|
||||
const baseUrl = this.config.url;
|
||||
return `${baseUrl}${this.basePath}/${key}`;
|
||||
}
|
||||
|
||||
@ -222,7 +222,8 @@ export class WebDAVService implements StorageProvider {
|
||||
* Get streaming URL for a file
|
||||
*/
|
||||
async getStreamingUrl(key: string): Promise<string> {
|
||||
const baseUrl = (this.client as any).getURL?.() || (this.client as any).toString() || this.config.url;
|
||||
// Use the config URL directly since WebDAV client doesn't expose getURL()
|
||||
const baseUrl = this.config.url;
|
||||
return `${baseUrl}${this.basePath}/${key}`;
|
||||
}
|
||||
|
||||
|
||||
1
packages/backend/test-playback.mp3
Normal file
1
packages/backend/test-playback.mp3
Normal file
@ -0,0 +1 @@
|
||||
test content
|
||||
Loading…
x
Reference in New Issue
Block a user