-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
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. |
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 ....... |
9892bb1
to
be2725d
Compare
OK, I fixed the tests. Will merge. |
…4068) Fix go-gitea#33990 --------- Co-authored-by: wxiaoguang <[email protected]>
…34236) Backport #34068 by wgr1984 Fix #33990 Co-authored-by: Wolfgang Reithmeier <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
* giteaofficial/main: Add API routes to lock and unlock issues (go-gitea#34165) Make ROOT_URL support using request Host header (go-gitea#32564) Valid email address should only start with alphanumeric (go-gitea#28174) Fix notify watch failure when the content is too long (go-gitea#34233) Add "--fullname" arg to gitea admin user create (go-gitea#34241) Fix various UI problems (go-gitea#34243) markup: improve code block readability and isolate copy button (go-gitea#34009) Don't assume the default wiki branch is master in the wiki API (go-gitea#34244) [skip ci] Updated translations via Crowdin Optimize the calling code of queryElems (go-gitea#34235) Actions Runner rest api (go-gitea#33873) Fix some trivial problems (go-gitea#34237) Swift files can be passed either as file or as form value (go-gitea#34068) # Conflicts: # templates/repo/wiki/revision.tmpl
Fix #33990