fix: S5File::Exists needs to check tus before uploads

This commit is contained in:
Derrick Hammer 2024-03-09 14:27:07 -05:00
parent d0d67d2ae5
commit 4020b9f7c7
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 7 additions and 0 deletions

View File

@ -92,6 +92,13 @@ func NewFile(params FileParams) *S5File {
}
func (f *S5File) Exists() bool {
ctx := context.Background()
exists, _ := f.tus.UploadExists(ctx, f.hash)
if exists {
return true
}
_, err := f.metadata.GetUpload(context.Background(), f.hash)
if err != nil {