This commit is contained in:
Colin 2024-06-26 11:17:02 -04:00
parent 2b04c03165
commit 3f6430490d
2 changed files with 4 additions and 0 deletions

Binary file not shown.

View File

@ -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)