Analyze javascript regex: someString.replace (/ ^. *, /, '')

I recently came across a great SO thread that uses Google App Scripts to save multipart uploads from a form to a Google Drive. One line in that answer calls: .replace(/^.*,/, '') on a base64 encoded representation of a file upload. My question is: wh

Using a Base64 Image Data URI to Input a POST

I'm getting an image back from an API in Base64 Data URL format. I need to use this as input to another API which is expecting a file in form data. Here's the CURL example: curl -X POST "<API URL>" -H 'content-type: multipart/form-data' -F

Angular download from JS to Java Play Framework

I have been struggling to upload a file using Angular JS to POST to my Java Play Framework RESTful backend as a lot of examples I have found don't apply to me. I am confident my Angular JS code works fine but I will share it anyway: file-upload.html

Confident & ldquo; Content-Type & rdquo; on file downloads

If I'm supporting the upload of content (mostly images and video) by my REST API's users, is it safe to trust the Content-Type they declare in (multipart) uploads? Or should I, instead, run some kind of "media type detection" on the content (usi

Easily manage invalid file downloads in the Spring REST service

I hit a roadblock trying to validate requests to a REST endpoint for uploading files. The upload works fine, as long as the request is correct, and now I'd like to include checks for whether the required fields are there and whether the data they con

How to read a Multipart file as a string in the spring?

I want to post a text file from my desktop using Advanced Rest Client. This is my controller: @RequestMapping(value = "/vsp/debug/compareConfig/{deviceIp:.*}", method = RequestMethod.POST, consumes = { "multipart/form-data" }, produces

Ajax callback with FormData fails for large files

I've a input file control where I can upload any kind of file. So, I'm getting the file and storing in a FormData and making an ajax call to my controller. It is working fine with Images and small .mp3 files. But when I'm uploading .mp3 files more th

How to prevent empty files on the html form on PHP

I have a website where users fill a form and upload their CVs (Curriculum Vitae). 95% of the time it works like it should and I get the CV file on the server. Althought I tried, I could never reproduce the error of the 5% users that fail. I know that

Download the file via jquery ajax post

I am trying to export my web page data and download it as excel file. but the download does not start even the response return succeed. $.ajax({ type: "POST", url: _url, contentType: 'multipart/form-data;boundary=SzB12x', data: json, }); The res

Download multiple files from Powershell script

I have a webapplication that can process POSTing of a html form like this: <form action="x" method="post" enctype="multipart/form-data"> <input name="xfa" type="file"> <input name="pdf&

Publish raw image data as multipart / form-data in curl

I am trying to post an image with cURL in PHP using multipart/form-data header since API that I am sending to is expecting image to be sent as multi-part form. I don't have problems talking to the API with other requests; only posting an image is an

Java file conversion to play.db.jpa.Blob

I have a Play 1.2.4 app that is the backend for a mobile app. I would like to upload a picture from the mobile app and associate that picture with a user. I have found lots of answers that show how easy it is to do image upload with Play if the uploa

What can cancel the $ _POST variable?

I'm transferring files using http post request from one host to another. Receiving host runs apache with php onboard. The request contains multipart/form-data and is performing by php script (cURL). There are 86 files with total size about 20Mb. The

Replace HTTP body read with .NET C # HTTPHandler

Using C# I'd like to take control over the reading of the HTTP Requests from a POST. Primarily to read the stream of a multipart/form-data file upload to track the stream as it's received from the client. Using the ProcessRequest or the Async BeginPr

Servlet call from the servlet

I would like to call a servlet from another servlet doing two things: setting the content type to "multipart/form-data" setting the method to "POST". This is very easy to do from a form, but I need to do it from another servlet. Any id

REST: Using PUT to Update with a File Upload

I'm coding an API and got stuck on the UPDATE part of things. From what I've read about REST the update operation should be exposed by using HTTP PUT. Ok, PUT gives me just a stream of data. At least in PHP the decoding of this data is my responsibil

Using the GAE Blobstore API with Flex

I'm developing a Flex application that should run on Google App Engine. This app should be able to load larg-ish XML files (1 to 50MB) from GAE and save them again. [UPDATE] I'm using Java. The Flex app is already running on GAE - but can't yet load/

Load the multipart test form

I'm trying to load-test a Rails application using JMeter. A critical part of the application involves a form that includes both text inputs and file uploads. It works fine in a browser, but when I try to post that page in JMeter, Rails is saving all