FAQ Database Discussion Community


What is Rack::Utils.multipart_part_limit within Rails and what function does it perform?

ruby-on-rails,ruby,rack,multipart
Rack::Utils.multipart_part_limit is set to 128 by default. What purpose does the value have and what effect does it have within the Rails system?...

required multipartfile parameter is not present

android,web-services,multipart
I am trying to upload image through my rest webservice , but when it comes to multipart-form data it gives me error HTTP Status 400 - Required MultipartFile parameter 'image' is not present below is my function to upload image public String uploadImages(String json, File file) { try { HttpClient...

How to write raw multipart SOAP HTTP message to output with Grails

http,grails,http-headers,multipart
I have a Grails application that should respond with previously stored raw SOAP messages. These messages are read from a database. When I write the message to output, it is added to body part of the HTTP response. The results is that reading the response on client end fails as...

Safari open and close img MIME type multipart / x-mixed-replace streaming on demand

javascript,dom,safari,multipart,mjpeg
testing a mobile Safari web application, I find that I have an image in your tag img src changes dynamically. This src reference to a url that generates a streaming mjpeg with MIME type multipart / x-mixed-replace. Changing the src notice that the browser does not close the connection to...

(Spring MVC) Upload multipartfile method POST returns 404 error

spring-mvc,post,controller,http-status-code-404,multipart
I have a Spring application with an update file form: <form class="form-inline" role="form" method="POST" enctype="multipart/form-data" action="<c:url value="upload" />"> <div class="form-group"> <label class="control-label"> <spring:message code="file.to.upload"/> </label> </div> <div class="form-group"> <input type="file" name="file" id="file" class="btn btn-primary"> </div> <div class="form-group"> <input type="submit" class="btn btn-primary"...

How to convert a MultiPartFile (image) to a data URI?

java,multipart,data-uri
On my site I am uploading an image and need to return the data URI of that image but I cannot work out how to do so (it must be server side). I have tried the following code but it seems to encode the name of the file. @RequestMapping(value="/path/toDataURL", method=RequestMethod.POST,...

paperclip gem upload not working in rails 4 multipart form

ruby-on-rails,paperclip,multipart,form-for
I'm trying to setup a basic form with the ability to upload a picture, a title and a body of text. I'm using the paperclip 4.2.1 gem and rails 4.2.0. The form shows up fine, I'm able to type in a title, some body text and select a picture. However,...

Multiparty library, not receiving file

node.js,mongodb,multipart
I am trying to implement a file uploader in my rest API. My technologies are node and mongo. My controller looks like: API.uploadFile = function(req, res) { var form = new multiparty.Form(); form.parse(req, function(err, fields, files) { res.writeHead(200, {'content-type': 'text/plain'}); res.write('received upload:\n\n'); res.end(util.inspect({fields: fields, files: files})); }); } When I...

multiparty for nodejs doesn't parse any uploaded file

angularjs,node.js,sails.js,multipart,skipper
I'm trying to perform simple upload file on node (multiparty) + angular (angular-file-upload) using sails.js on the backend. It seemed like frontend correctly sent a file to backend, but it appeared as the backend received nothing or responded with invalid request (inconsistently). form.parse part responded with empty fields and file....

Should I compress a Bitmap before POSTing it to a server?

android,post,bitmap,multipart
I have a question regarding best practices for this. If I am doing a multi part request to a server, should I compress the .jpg file (assuming the .jpg file is large) I would be POSTing to the API on the client (Android) side? Or is this usually not a...