feat: broadcast file if tus has the upload as well
This commit is contained in:
parent
e1556f2f68
commit
46b407bd9a
|
@ -121,6 +121,13 @@ func (s S5ProviderStore) CanProvide(hash *encoding.Multihash, kind []types.Stora
|
||||||
switch t {
|
switch t {
|
||||||
case types.StorageLocationTypeArchive, types.StorageLocationTypeFile, types.StorageLocationTypeFull:
|
case types.StorageLocationTypeArchive, types.StorageLocationTypeFile, types.StorageLocationTypeFull:
|
||||||
rawHash := hash.HashBytes()
|
rawHash := hash.HashBytes()
|
||||||
|
|
||||||
|
if exists, upload := s.proto.portal.Storage().TusUploadExists(rawHash); exists {
|
||||||
|
if upload.Completed {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
if exists, _ := s.proto.portal.Storage().FileExists(rawHash); exists {
|
if exists, _ := s.proto.portal.Storage().FileExists(rawHash); exists {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue