diff --git a/dist/ae-send_windows_amd64.exe b/dist/ae-send_windows_amd64.exe index 04710dd..008236d 100755 Binary files a/dist/ae-send_windows_amd64.exe and b/dist/ae-send_windows_amd64.exe differ diff --git a/main.go b/main.go index ba843c8..41004e1 100644 --- a/main.go +++ b/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)