fix(backend): fixed wrong error check
This commit is contained in:
parent
b26a1c28b6
commit
c33279c141
1 changed files with 1 additions and 1 deletions
|
|
@ -95,7 +95,7 @@ func (s *Storage) uploadKey(sessID uint64, suffix string, shouldSplit bool, retr
|
|||
|
||||
// Check file size before download into memory
|
||||
info, err := os.Stat(filePath)
|
||||
if err != nil {
|
||||
if err == nil {
|
||||
if info.Size() > s.cfg.MaxFileSize {
|
||||
log.Printf("big file, size: %d, session: %d", info.Size(), sessID)
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue