I am writing a server-side application with embed jetty that receives a request from a third-party client. The client uploads small files to the server. But I am surprised to see that the client does not load the file data as an application / octet stream, instead it loads json as application / json, which includes all metadata about the file and in the field all data as a string. for a simple example
{"_id": "fruit", "name": "fruit", msgstr "" "tarball": "http: // localhost: 8585 / fruit / - / fruit-2.0.0.tgz", "_attachments": {"fruit-2.0.0.tgz": {"content_type": "application / octet-stream", "data": "mF6 / 622swKoG0kbVvS8qCyF5r48CuyiCO60Mcl / LnOyufzAEZ5xxxhn / IT4DO4Fr4QAMAAA}},"}
Now the question is, how can I convert this to a .tgz file? I can’t change the client, so I need to work with this.
source
share