mirror of
https://github.com/anyproto/anytype-heart.git
synced 2025-06-11 10:18:28 +09:00
add additional check
Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
This commit is contained in:
parent
f385ed992c
commit
b26ad19ccf
1 changed files with 4 additions and 1 deletions
|
@ -150,7 +150,10 @@ func (sf *sfile) upload(s *state.State, id string, source FileSource, isSync boo
|
|||
if !ok {
|
||||
return UploadResult{Err: fmt.Errorf("not a file block")}
|
||||
}
|
||||
upl := sf.newUploader().SetBlock(f).SetOrigin(source.Origin.Origin).SetImportType(source.Origin.ImportType)
|
||||
upl := sf.newUploader().SetBlock(f)
|
||||
if source.Origin != nil {
|
||||
upl.SetOrigin(source.Origin.Origin).SetImportType(source.Origin.ImportType)
|
||||
}
|
||||
if source.Path != "" {
|
||||
upl.SetFile(source.Path)
|
||||
} else if source.Url != "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue