Skip to content

Conversation

@Axb12
Copy link
Contributor

@Axb12 Axb12 commented Jun 10, 2025

Fixed the bug that the filename was missing due to the last PR.(#994)
I've added a file struct to override what was going on before the last PR.(#994)
I'm so sorry because of my negligence that caused this issue.
Here are two related issues I've seen:(#1012), (#1010)

@codecov
Copy link

codecov bot commented Jun 10, 2025

Codecov Report

Attention: Patch coverage is 57.69231% with 11 lines in your changes missing coverage. Please review.

Project coverage is 85.43%. Comparing base (ff9d83a) to head (932eacc).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
image.go 21.42% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1017      +/-   ##
==========================================
- Coverage   85.77%   85.43%   -0.35%     
==========================================
  Files          43       43              
  Lines        2291     2313      +22     
==========================================
+ Hits         1965     1976      +11     
- Misses        304      315      +11     
  Partials       22       22              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

return file{rdr, filename, contentType}
}

type file struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the file struct should be put here

filename = f.Name()
}
}
var contentType string
Copy link
Contributor Author

@Axb12 Axb12 Jun 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the default Content-Type is set to application/octet-stream here

Copy link
Owner

@sashabaranov sashabaranov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for the fix!

@sashabaranov sashabaranov merged commit d7dca83 into sashabaranov:master Jun 16, 2025
1 of 3 checks passed
Rosenberg96 pushed a commit to lunarway/go-openai that referenced this pull request Aug 18, 2025
* fix image api missing filename bug

* add test

* add test

* update test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants