This commit is contained in:
Shreyas Goenka 2025-01-02 18:54:35 +05:30
parent 7ab9fb7cec
commit ac37ca0d98
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 4 additions and 0 deletions

View File

@ -168,6 +168,10 @@ func (w *DbfsClient) putFile(ctx context.Context, path string, overwrite bool, f
return
}
_, err = io.Copy(contents, file)
if err != nil {
pw.CloseWithError(fmt.Errorf("error while streaming file to dbfs: %w", err))
return
}
err = writer.Close()
if err != nil {
pw.CloseWithError(fmt.Errorf("failed to close multipart form writer: %w", err))