NativeScript / nativescript-background-http

Background Upload plugin for the NativeScript framework
Apache License 2.0
102 stars 50 forks source link

upload image using web api 2 c# #81

Closed yclau closed 6 years ago

yclau commented 6 years ago

Hi, I trying using this plugin in server web api 2 c#. But I research and keep testing still fail. May I know what request are using in this plugin ? (FTP, HTTP multipart/form-data or binary requests).

romulowspp commented 6 years ago

This depends what method you are using.

You can use multipartUpload to multipart/form-data for example. What method are you using? You can see your server logs?

yclau commented 6 years ago

i follow the this 2 example for testing purpose below and can't get the result :
1) http://www.c-sharpcorner.com/article/uploading-image-to-server-using-web-api-2-0/ 2) http://www.c-sharpcorner.com/article/upload-and-save-multipartform-data-in-webapi-2/

PanayotCankov commented 6 years ago

Hi,

It is http, and the file is binary by default, that's what the iOS background upload sessions support by default. You can check the example server here: https://github.com/NativeScript/nativescript-background-http/blob/master/examples/www/server.js#L6

Recently the multipartUpload was implemented by wrapping the multiple files together in a single binary file provided to the iOS background session for upload, and the protocol there is again http.