You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're are migrating one of our micro-services written in NodeJS Javascript which handles all things related to upload into Go, thinking to use gin framework. However I've noticed a few things when doing a multipart upload.
For curl --location '0.0.0.0:8081/upload' \ --form 'file=@"/Users/name/Downloads/test.pdf"' ,
It prints map[file:[0x14000194ea0]]
For curl --location '0.0.0.0:8081/upload' \ --form '=@"/Users/devel/Downloads/Profile.pdf"',
It prints map[]
To my surprise it seems that when the "key" is not provided it fails to parse the form body. We did not face this issue with our current implementation in NodeJs Fastify framework, where request.file() gives you the first file in the multipart request.
Is there a way in Gin which has such similar effect, maybe grouping by form boundary?
The text was updated successfully, but these errors were encountered:
We're are migrating one of our micro-services written in NodeJS Javascript which handles all things related to upload into Go, thinking to use gin framework. However I've noticed a few things when doing a multipart upload.
Following is the basic code implementation
curl --location '0.0.0.0:8081/upload' \ --form 'file=@"/Users/name/Downloads/test.pdf"'
,map[file:[0x14000194ea0]]
curl --location '0.0.0.0:8081/upload' \ --form '=@"/Users/devel/Downloads/Profile.pdf"'
,map[]
To my surprise it seems that when the "key" is not provided it fails to parse the form body. We did not face this issue with our current implementation in NodeJs Fastify framework, where
request.file()
gives you the first file in the multipart request.Is there a way in Gin which has such similar effect, maybe grouping by form boundary?
The text was updated successfully, but these errors were encountered: