multipartform-data

What is the boundary parameter in an HTTP multi-part (POST) Request?

╄→尐↘猪︶ㄣ 提交于 2019-11-26 10:26:07
问题 I am trying to develop a sidebar gadget that automates the process of checking a web page for the evolution of my transfer quota. I am almost at it but there is one last step I need to get it working: Sending an HttpRequest with the correct POST data to a php page. Using a firefox plugin, here is what the \"Content-Type\" of the header looks like: Content-Type=multipart/form-data; boundary=---------------------------99614912995 with the parameter \"boundary\" seeming to be random, and the

Node.js (with express & bodyParser): unable to obtain form-data from post request

£可爱£侵袭症+ 提交于 2019-11-26 09:49:44
问题 I can\'t seem to recover the form-data of a post request sent to my Node.js server. I\'ve put below the server code and the post request (sent using postman in chrome): Post request POST /api/login HTTP/1.1 Host: localhost:8080 Cache-Control: no-cache ----WebKitFormBoundaryE19zNvXGzXaLvS5C Content-Disposition: form-data; name=\"userName\" jem ----WebKitFormBoundaryE19zNvXGzXaLvS5C NodeJS server code var express = require(\'express\'); // call express var app = express(); // define our app

Composing multipart/form-data with a different Content-Type on each parts with Javascript (or Angular)

痞子三分冷 提交于 2019-11-26 09:39:20
问题 Wrong question asked, see my update below I need to integrate my AngularJS Project with an existing RESTful API. These API consume POST request which upload a file , and also submit the form data in a request. Unfortunately, one of the form input requires to be in Content-Type: Application/json . After search on the web, I could only POST with Content-Type: multipart/form-data in which each of the parts does not have a specific MIME . How can I compose my multipart/form-data with a different

Android upload video to remote server using HTTP multipart form data

帅比萌擦擦* 提交于 2019-11-26 09:31:05
问题 I\'m having trouble on a certain piece of a current project and feel like I\'m stuck right now. I\'m trying to do a video upload with an HTTP post and multipart form data. I feel like I\'m hit a wall in understanding the HTTP protocol and specifically multipart form data. I have a URL to upload videos to in the format http://videoupload.thecompany.com/VideoApp.xml?method=upload&objectType=person&objectId=777777. I also need to include a title, description, and the videoFile of course. Are

How to set up a Web API controller for multipart/form-data

强颜欢笑 提交于 2019-11-26 08:08:00
问题 I am trying to figure this out. I was not getting any useful error messages with my code so I used something else to generate something. I have attached that code after the error message. I have found a tutorial on it but I do not know how to implement it with what I have. This is what I currently have: public async Task<object> PostFile() { if (!Request.Content.IsMimeMultipartContent()) throw new Exception(); var provider = new MultipartMemoryStreamProvider(); var result = new { file = new

Apache HttpClient making multipart form post

六月ゝ 毕业季﹏ 提交于 2019-11-26 07:58:26
问题 I\'m pretty green to HttpClient and I\'m finding the lack of (and or blatantly incorrect) documentation extremely frustrating. I\'m trying to implement the following post (listed below) with Apache Http Client, but have no idea how to actually do it. I\'m going to bury myself in documentation for the next week, but perhaps more experienced HttpClient coders could get me an answer sooner. Post: Content-Type: multipart/form-data; boundary=---------------------------1294919323195 Content-Length:

Angularjs how to upload multipart form data and a file?

£可爱£侵袭症+ 提交于 2019-11-26 07:22:25
问题 I\'m a beginner to angular.js but I have a good grasp of the basics. What I am looking to do is upload a file and some form data as multipart form data. I read that this isn\'t a feature of angular, however 3rd party libraries can get this done. I\'ve cloned angular-file-upload via git, however I am still unable to post a simple form and a file. Can someone please provide an example, html and js of how to do this? 回答1: First of all You don't need any special changes in the structure. I mean:

Web API: how to access multipart form values when using MultipartMemoryStreamProvider?

不羁岁月 提交于 2019-11-26 07:18:23
问题 I used to use MultipartFormDataStreamProvider to process multipart requests. Since I want the uploaded file to be stored in memory, instead of a disk file, I\'ve changed my code to use MultipartMemoryStreamProvider . The file loading seems to be working fine but I am no longer able to access other form values which were available through provider.FormData under MultipartFormDataStreamProvider . Could someone show me how to do this? The raw request captured by Fiddler: POST http://myserver.com

Example of multipart/form-data

假装没事ソ 提交于 2019-11-26 05:55:56
问题 I am wondering if anyone can share with me an example of multipart/form-data that contains: Some form parameters Multiple files 回答1: EDIT : I am maintaining a similar, but more in-depth answer at: https://stackoverflow.com/a/28380690/895245 To see exactly what is happening, use nc -l or an ECHO server and an user agent like a browser or cURL. Save the form to an .html file: <form action="http://localhost:8000" method="post" enctype="multipart/form-data"> <p><input type="text" name="text"

Retrofit - Multipart request: Required MultipartFile parameter &#39;file&#39; is not present

一世执手 提交于 2019-11-26 05:35:02
问题 I\'m trying to send file on server using Retrofit2. I do everything according documentation, but always get 400 server error. I\'m tried to do like this: RequestBody body = RequestBody.create(MediaType.parse(\"image/png\"), photo); //.......... @Multipart @POST(ADD_PHOTO) Observable<HPSPhotoResponse> addPhoto(@Part(\"file\") RequestBody file); ...and like this: MultipartBody.Part part = MultipartBody.Part.createFormData(\"file\", \"file\", body); //........... @Multipart @POST(ADD_PHOTO)