c# - Using ServiceStack to upload image files -
we have requirement upload images using servicestack apis.
i aware of 2 possible ways:
1) use json object upload file (using base64 string). 2) use "multipart/form-data"
is there other way of uploading files using servicestack? better in terms of best practices?
the best way upload files in servicestack normal http file upload see source code imgur.servicestack.net or file uploads in restfiles examples.
if don't want send multipart/form-data
use binary format protocol buffers support in servicestack , send byte[]
avoid computational , payload overhead of encoding binary files in text format.
Comments
Post a Comment