Fixup
This commit is contained in:
parent
2b04c03165
commit
3f6430490d
Binary file not shown.
4
main.go
4
main.go
|
@ -77,6 +77,10 @@ func uploadFile(filename string) (string, error) {
|
|||
}
|
||||
defer response.Body.Close()
|
||||
|
||||
if response.StatusCode != http.StatusOK {
|
||||
return "", fmt.Errorf("upload failed with status: %s", response.Status)
|
||||
}
|
||||
|
||||
urlBytes, err := io.ReadAll(response.Body)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to read response: %w", err)
|
||||
|
|
Loading…
Reference in New Issue