<div dir="ltr">Hi All,<div><br></div><div>There was a requirement to parse multipart form data during file upload for the vendor-specific interface.<br></div><div><br></div><div>The Curl command for multiple file upload will be:</div><div><br></div><div>"curl -c cjar -b cjar -k -H "Content-Type: multipart/form-data" -H "X-Auth-Token: $bmc_token" -F 'sa1=@/path/to/file1' -F sa2=@/path/to/file2' -X POST https://$bmc/ibm/v1/files/partitions/"</div><div><br></div><div>The above multipart request contains the file contents separated by a boundary and each file contains the filename, Content-Type and Content-Disposition.</div><div><br>There were few considerations for this and after testing those libraries, the mimetic library seemed to fit for this purpose. Please refer to <a href="https://github.com/LadislavSopko/mimetic" target="_blank">https://github.com/LadislavSopko/mimetic</a><br><br>Only a part of code from this library is used for this purpose (which is under "mimetic" folder in this repo).<br><br>Regression tests were conducted with that part of the library that is being used for multi-part parsing, as a part of which there was no memory leakage found after firing a large number of requests (2000 requests in this case).</div><div><br></div><div>There was a difference of 71.68 KB in the openbmc flash size when this library is pulled. The mimetic shared object files are used from mimetic/codec/.libs.<br></div><div><br>If there are other suggestions for the multi-part form data parsing or if there are suggestions for any other test that needs to be done, please post in the suggestions.<br><div><br></div>-- <br><div data-smartmail="gmail_signature" dir="ltr"><div dir="ltr"><div><div dir="ltr">Thanks & Regards,<div>Asmitha Karunanithi</div></div></div></div></div></div></div>