-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Swift files can be passed either as file or as form value #34068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Swift files can be passed either as file or as form value #34068
Conversation
Alternative fix with minimal changes: @@ -304,10 +304,18 @@ func UploadPackageFile(ctx *context.Context) {
packageVersion := v.Core().String()
- file, _, err := ctx.Req.FormFile("source-archive")
+ var file io.ReadCloser
+ multipartFile, _, err := ctx.Req.FormFile("source-archive")
if err != nil {
- apiError(ctx, http.StatusBadRequest, err)
- return
+ content := ctx.Req.FormValue("source-archive")
+ if content != "" {
+ file = io.NopCloser(strings.NewReader(content))
+ } else {
+ apiError(ctx, http.StatusBadRequest, err)
+ return
+ }
+ } else {
+ file = multipartFile
}
defer file.Close() + tests |
hi @wgr1984, would you be interested in continuing to complete the pr? |
sure, will finish it once i find a minute to get local build running, in
order to confirm impl. and update test (in case needed)
Am Do., 3. Apr. 2025 um 12:04 Uhr schrieb hiifong ***@***.***
…:
hi @wgr1984 <https://github.com/wgr1984>, would you be interested in
continuing to complete the pr?
—
Reply to this email directly, view it on GitHub
<#34068 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADEBZPEB6PIYRVWM734MXD2XUBRZAVCNFSM6AAAAAB2B5CUJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONZVGE3DQNZYGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: hiifong]*hiifong* left a comment (go-gitea/gitea#34068)
<#34068 (comment)>
hi @wgr1984 <https://github.com/wgr1984>, would you be interested in
continuing to complete the pr?
—
Reply to this email directly, view it on GitHub
<#34068 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADEBZPEB6PIYRVWM734MXD2XUBRZAVCNFSM6AAAAAB2B5CUJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONZVGE3DQNZYGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
a2a92fb
to
6ded601
Compare
CI failure seems related. |
914178e
to
7101dc2
Compare
7101dc2
to
7af142a
Compare
…ndline-throws-error
Need to figure out the root problem and fix.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI fails, need to figure out the root problem and fix.
I know why because the test cases rely on each other. To test that went
need to get the. Independent, but it's a bigger change ...
wxiaoguang ***@***.***> schrieb am Mo. 14. Apr. 2025 um 02:18:
… ***@***.**** requested changes on this pull request.
CI fails, need to figure out the root problem and fix.
—
Reply to this email directly, view it on GitHub
<#34068 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADEBZIP6ZS4Q3KTGOEZBT32ZL5F7AVCNFSM6AAAAAB2B5CUJCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDONRSHA4TQMRXGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Just move the upload test to the bottom or remove the package after uploading. |
more fixing the symptom than the issue but sure, will do |
Strange, it doesn't explain why only MySQL fails, other databases succeed ..... anyway we need to make the CI pass to merge ....... |
Fix #33990