fix: S5File::Exists needs to check tus before uploads
This commit is contained in:
parent
d0d67d2ae5
commit
4020b9f7c7
|
@ -92,6 +92,13 @@ func NewFile(params FileParams) *S5File {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *S5File) Exists() bool {
|
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)
|
_, err := f.metadata.GetUpload(context.Background(), f.hash)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue