Questions tagged [multipartform-data]

1

votes
1

answer
2.3k

Views

Handling multipart form in Vertx

I have got a multipart form with some text fields and some upload files. I need to handle this multipart post request in vertx handler so that all the uploaded files (variable number) should be read in chunks (for memory effeciency purpose). The moment I read the chunks (in foreach loop), I want to...
Obaid Maroof
1

votes
2

answer
3.3k

Views

How to use the Ansible uri module to POST a file as form-data?

SonarQube allows the upload of a profile.xml file via form-data POST request as follows: curl -u admin:admin -X POST http://sonar:9000/qualityprofiles/restore -F [email protected] I'm trying to translate this curl command into Ansible, using the uri module. Unfortunately, I don't see any chance to...
dokaspar
0

votes
0

answer
5

Views

Missing boundary in multipart/form-data POST while importing business card using composer-rest-server /api/wallet/import

Getting this error while importing business network card to composer-rest-server: Treating unknown remoting type "file" as "any" Treating unknown remoting type "file" as "any" Unhandled error for request POST /api/wallet/import: Error: bad content-type header, no multipart boundary My Code: const fi...
Malik Ali
1

votes
2

answer
4.7k

Views

Problems using multipart_encode (poster library)

I am trying to upload a file using multipart_encode to realize the MIME process. However, I met the following error AttributeError: multipart_yielder instance has no attribute '__len__'. Below are is my approach, I really appreciate if anyone can give me some suggestions. url = "https://pi-user-file...
TH339
1

votes
0

answer
10

Views

How to resolve org.glassfish.jersey.server.ContainerException: java.lang.NoSuchMethodError: org.jvnet.mimepull.MIMEMessage.close()V

We are working on a java REST service which will consume multipart/form-data. We need to upload a file and a xml payload in the same REST operation. The following is our code: web.xml ServletName org.glassfish.jersey.servlet.ServletContainer jersey.config.server.provider.packages package-nam...
azaveri7
1

votes
1

answer
2.8k

Views

How to change originalFilename of MultipartFile

I have a MultipartFile file on server side. I would like to change the original file name of this file, yet the class only support getOriginalFilename(). Can anyone help me with this? PS: It is an image file uploaded. Thanks alot.
Le Kim Trang
1

votes
1

answer
810

Views

Posting Image to Pinterest API

I am trying to post a image to Pinterest using their SDK (PDK). The specific method I am using is PDK.request('/pins/', 'POST', { board: board.id, note: "description", link: "link", image_base64: "" }, function(e){ console.log(e); }); There are three options to send the image. sending the image_url...
Henry L
1

votes
3

answer
4.7k

Views

Send image and text with ajax

I'm using javascript's 'formData' to send image files with ajax. How can I attach other data to formData, for example a text string? JS: $("#post-image").click(function(){ $.ajax({ url: "../../build/ajaxes/upload-photo.php", type: "POST", data: formdata, processData: false, contentType: false, succ...
Don P
1

votes
2

answer
3.8k

Views

MULTIPART_STRICT_ERROR marking product upload in magento as malicous

I am running a magento installation for one of my client and the server there has modSecurity installed. While I was trying to upload the products, I have been getting the following error. Match of "eq 0" against "MULTIPART_STRICT_ERROR" required. [file "/usr/local/apache/conf/modsec2.conf"] [line "...
user1064386
1

votes
1

answer
1.3k

Views

Mule ESB and “multipart/form-data”

I have a working Web service that allows me to upload a file. I'd like to put Mule 3 in front of it but I have not been successful in getting it to pass along payloads whose MIME type is "multipart/form-data". Attempts to do so produce a 400 error: "The request sent by the client was syntacticall...
Tad
1

votes
1

answer
1.2k

Views

Python: using reuests library for multipart/form-data

I am fairly a noob at this and have been trying to use requests modules to post a multipart/form-data. To clarify, the exact test case I am trying to use is the one same as in https://github.com/kennethreitz/requests/issues/1081. i.e. I am trying to do a post without a file : --3eeaadbfda0441b8be82...
goofd
1

votes
1

answer
922

Views

Multiple Upload Controller in Play Framework / Scala

I'm trying to upload multiple files from a "multipart/form-data" form and have them all stored in folders with a batch ID (which is just a timestamp) The problem is I'm only currently able to save one file. View @helper.form(action = routes.Application.upload, 'enctype -> "multipart/form-data", 'mul...
coulbourne
0

votes
0

answer
15

Views

Getting null pointer exception when using multipart form data with retrofit

I'm trying to upload a file to my database but while uploading. Into the on response my app is crashing with an null object reference exception. Here is my error log: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.pmsapp.pojo.Result.getMessage()' on a null obj...
Ruchit Patel
1

votes
2

answer
2.7k

Views

Mule http:outbound-endpoint + multipart/form-data

I'm trying to call a rest service that expects to receive a multipart/form-data and I am facing some issues with this. After a while searching, I've understood that I had to move the payload to an outbound attachment and set the payload to null. I've also done that, but got the error: I received a...
Paola Bueno
1

votes
2

answer
4.2k

Views

Java type class com.sun.jersey.multipart.FormDataMultiPart, and MIME media type multipart/form-data was not found

I see following error in my tomcat logs... ERROR c.s.j.spi.container.ContainerRequest - A message body reader for Java class com.sun.jersey.multipart.FormDataMultiPart, and Java type class com.sun.jersey.multipart.FormDataMultiPart, and MIME media type multipart/form-data was not found. The register...
user1014923
1

votes
1

answer
865

Views

How to arrange the order of data and file using requests to post multipart/form-data?

I want to arrange file in front of data. If I try the traditional way, the data appears in front of file. To be more specifically, I want myfile to appear before form_value. form_value={'exp':'python', 'ptext':'text', 'board':'Pictures'} myfile = {'up': ('aa.png', open('aa.png', 'rb'), 'image/png')...
Dong
1

votes
1

answer
1.3k

Views

Image Upload using MVC API POST Multipart form

My View :- @[email protected] JQuery :- submitComment: function (form, type) { var self = this; var $this = $(form); var formData = $this.serialize(); var $message = $this.find('.feedback'); $message.hide(); $message.html(''); var val = validation({ $form: $this }); if (val.checkRequired()) { $thi...
ujjaval
1

votes
2

answer
212

Views

How to save more than one paramerters passed to a servlet from a multipart form?

I couldn't figure out how to use getParts() to save the parameters. I am trying to pass 4-5 inputs of type text along with an image file. I want to retrieve the parameters into strings so I can add them to the database and save the image in a blob format in the database (not in the server directory)...
user2626445
1

votes
1

answer
2.1k

Views

Grails Multipart Service Stream ended unexpectedly

I'm coding an ios app and I need to send photo from my app to my grails server. In ios i do this: +(void)sendPhoto:(NSData *)data withName:(NSString *)name onController:(UIViewController *)controller { MERequest *request = [[MERequest alloc] init]; request.delegate = controller; //User User *user =...
Allen Walker
1

votes
1

answer
32

Views

transormRequest only for a specifc request in angularJS

I wanted to pass multipart/formdata through a $resource in angular in order to post an image. I followed the magic answer founded here AngularJS: Upload files using $resource (solution) But this solution apply for all requests in my modules. And I want it to apply only for one $resource or two. If p...
cocoggu
1

votes
3

answer
2k

Views

Send Unicode characters via MultipartEntity

I have a method to send image and text as a HttpPost using MultipartEntity content type. Everything works great with English symbols, but for unicode symbols (for example Cyrliics) it sends only ???. So, I'm wondering, how to set UTF-8 encoding for MultipartEntity correctly, since I've tried several...
mol
1

votes
1

answer
1.4k

Views

FormData empty when constructing with element

Trying to construct a new FormData object to send as part of an AJAX request, however constructing the object with a jQuery selected object remains empty. Am I doing something wrong?
Aesthete
1

votes
1

answer
679

Views

'system.argumentexception' When uploading multipart

I am trying to post multipart data using System.Net.Http.HttpClient but when I am instanciating my content I am getting this exception: A first chance exception of type 'System.ArgumentException' occurred in System.Net.Http.DLL An exception of type 'System.ArgumentException' occurred in System.Net.H...
eeadev
1

votes
1

answer
876

Views

Prototype js : input type file is missing on ajax submit

I have create a varien custom form and want to submit the form using prototype ajax.This form contain four fields two text field and two file field. But when i submit the data using ajax of prototype js the form did not passed two field and on enctype="multipart/form-data" but does not works. Code...
Amit Bera
1

votes
1

answer
2.6k

Views

Spring form with only one input of type=file

I'm trying to upload a MultipartFile with spring. I want to used the Spring form tags to contain the input of type file which will eventually upload this file to my controller. So I created a FileForm class which is just a java bean with only one property on the type MultipartFile. My JSP looks lik...
Henrique Ordine
1

votes
1

answer
1.3k

Views

Sending nested JSON with image

I have been trying to research a way to be able to send nested JSON requests via Ajax back to the server. From my understanding formdata that we mostly use for sending images or files to the server wont work in this scenario, since it seems like FormData does not handle nested objects. This is the k...
Jonathan
1

votes
1

answer
362

Views

QHttpMultiPart POST returns error 500

I'm experimenting with multi-part form submissions for the purpose of uploading files to a web server. I adapted the following code from the sample found in the documentation for QHttpMultiPart: QHttpMultiPart * pMultiPart = new QHttpMultiPart(QHttpMultiPart::FormDataType); QHttpPart textPart1; tex...
mjk99
0

votes
0

answer
7

Views

Sending file in a PUT request using HTML forms and Ajax

I am trying to send an image file to a backend server using a PUT request. HTML: Javacript: const profileInput = document.getElementById('profilePicInput'); profileInput.addEventListener("change", handleFiles, false); function handleFiles(){ const formData = profileInput.files[0]; $.ajax({ url: '../...
Sharon
1

votes
1

answer
1.5k

Views

iOS: Alamofire multipart image submit

I'm trying to submit an image with some other values to an "Article" object, which works except when I'm adding an image then I will get the following error: ArgumentError (invalid byte sequence in UTF-8) This is my function for submitting a new object: func submitArticle() { let description = full...
Vincent van Ruijven
1

votes
3

answer
2.5k

Views

retrofit:2.0.0-beta2 post array of files

I am sending multiple data to server, using retrofit retrofit:2.0.0-beta2. Data contains array of Files ArrayList. I am using this code to send apart File: public Call requestUpdateProfile3(String token, File image) { RequestBody requestBodyImage = RequestBody.create(MediaType.parse("multipart/...
kadik
1

votes
1

answer
514

Views

PHP+JS: How to do Fileuploads in HTML Form as Content-Type Multipart (via JS)?

Having an HTML Form that is submittet via POST (user clicking the submit button). Furthermore having an image that is read via Javascript of a canvas object (getImageData()). Question: How to "inject" this image data into the HTML Form, so that it gets uploaded as Content-Type:multipart/form-data...
Tim Schmidt
1

votes
1

answer
6.4k

Views

No injection source found for a parameter of type public javax.ws.rs.core.Response - Jersey - MultiPartFeature

I'm creating a web service with Jersey and Jetty Embedded with no web.xml file. It is very simple, It receive a binary file by a POST from a HTML form. It seems I didn't register the MultiPart Feature properly because When I try to use it with HTML form I get this error : * WARNING: No injection sou...
Victor
1

votes
0

answer
12

Views

Java's HttpURLConnection seems to append 0018 character in request?

I'm trying to send an image via HTTP. I've tested it via Chrome, using Wireshark to see the details of the request. The separation between the headers and the multipart content is \r\n. My implementation, in Java, however, seems to have a separation being \r\n and the character 0018, which according...
CLOVIS
1

votes
3

answer
626

Views

How to send array in params using Alamofire multipart

I am using Alamofire for uploading image and file to the server. But I am facing issue to send an array in parameters with the image. But when I send an array in params it converts the array in JSON string. But I want to send an array in params, not JSON string. I have searched a lot and did not fin...
gaurav gupta
0

votes
0

answer
4

Views

NetworkingError (EPIPE) while uploading big files into S3 bucket

I am trying to uploading a large size video file into an S3 bucket. It works when I am uploading an Image (small size files), but I am getting the following error when I uploaded large video files into an S3 bucket. (NetworkingError) Error Message: Upload part error: { Error: write EPIPE at WriteWra...
Arun
2

votes
2

answer
2.1k

Views

CURL multipart form post - HTTP error before end of send, stop sending

I am sending a multipart form POST via CURL from Linux shell script. The request works fine in Postman but from CURL it fails with: Internal Server Error then HTTP error before end of send, stop sending I even copy the Curl for Linux Shell code directly from Postman and paste into the shell script,...
Dan Cook
3

votes
2

answer
3.6k

Views

Spring Boot doesn't use CommonsMultipartResolver?

I have a problem with REST web service running with Spring Boot (Jetty). One of my REST method is file upload and I'm guessing that CommonsMultipartResolver is not using during multipart requests. Signature of this upload method is : @ResponseBody @RequestMapping(value = "/upload", method = RequestM...
Pawel Urban
3

votes
2

answer
945

Views

Convert cURL request to Python-Requests request

I want to convert this cURL request to a Python-Requests request since I am working on a Python wrapper for a REST service MS_WORD_DOCUMENT=... CONTENT_TYPE="application/msword" JSON_REQUEST="{\"documentType\" : \"$CONTENT_TYPE\"}" curl -X POST -F "meta=$JSON_REQUEST;type=application/json" -F "data=...
3

votes
3

answer
7k

Views

How to Upload a photo using Retrofit?

I'm using Retrofit in my Android application to communicate with a REST-API. When user changes his profile picture in my application, I need to send a request and upload new image. This is my service: @Multipart @PATCH("/api/users/{username}/") Call changeUserPhoto(@Header("Authorization") String t...
Arash Khoeini
3

votes
1

answer
5.2k

Views

Sending multiple files with Jersey: MessageBodyWriter not found for multipart/form-data

I'm new in java rest application. I'm trying to run an application, but i have this exception message com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class java.util.ArrayList, and MIME media type, multipart/form-data, was not found exception com.sun.jersey.api...
Mehdi

View additional questions