4,751 questions
0
votes
0
answers
34
views
What happens when uploading a large file from client browser to my Spring boot server if I delay reading the multipart file from input stream?
Context: I am trying to build a Spring Boot application and have exposed a REST api endpoint to upload files(as large as 1 GB).
Question: Since the data transfer for a multipart file happens in chunks ...
0
votes
0
answers
57
views
React Native (Expo SDK 54): How to encrypt request body when sending FormData (file upload)?
I’m using React Native with Expo SDK 54, and I have an API client built with Axios.
All my normal JSON requests are encrypted before being sent to a .NET 6 backend. When I send a normal JSON body, my ...
0
votes
0
answers
63
views
WebClient sending an empty multipart request to Flask service
I have a problem with sending multipart/form-data requests from my Java service (using WebClient but same history with RestTemplate) to Flask service. It seems like a sent body is just empty as I get ...
0
votes
0
answers
58
views
How to mock multipart/form-data with pytest?
I have a POST endpoint with fastapi that goes a little like this. This takes in an excel file and turns it into a pandas dataframe.
@router.post(
"/endpoint/upload_excel",
status_code=status....
0
votes
0
answers
42
views
FastAPI: PDF upload works when called directly inside Kubernetes or locally, but results in blank files when routed through API Gateway/NGINX
I’m running a FastAPI service in Kubernetes that accepts multipart/form-data uploads and stores files in S3.
The upload endpoint works fine when I call it directly inside the cluster using the service ...
0
votes
1
answer
73
views
How to Fix swagger_dart_code_generator Generating List<int> Instead of MultipartFile for File Uploads in Flutter
What are the details of your problem?
In my Flutter project, I'm using swagger_dart_code_generator to generate Chopper-based API client code from a Swagger 2.0 JSON file for a multipart/form-data file ...
2
votes
1
answer
166
views
.NET CopyToFileAsync reciving "Safe handle has been closed." exception
With the code below I am getting the "Safe handle has been closed." from CopyToFileAsync. This happens even if only a single file operation is taking place. Also, this only happens on large(...
4
votes
1
answer
131
views
Minimal API: Dictionary<string, string> always null when sending data with IFormFile via multipart/form-data
I’m using ASP.NET Core Minimal API. I have an endpoint where I want to receive an IFormFile along with a Dictionary<string, string> property in the same request. I set the Accepts<...
1
vote
1
answer
88
views
Browser debugger shows less time taken to download a base64 over a multi-part file despite the larger file size [closed]
Today, I researched Base64 encoding versus other methods and whether to use it in a JSON API, considering the 33-37% size overhead that Base64 introduces and all sorts of related topics.
To ...
1
vote
1
answer
60
views
Alamofire network api request for uploading images failed on putting application into background ios
The updated API request which support background execution, for uploading images to server.
UIApplication.withBackgroundTask(name: "UploadImage") { endTask in
self.ShowHUD()
...
1
vote
1
answer
76
views
How to send multipart text and form parts with FastAPI TestClient?
I'm working against an API specification outside my control. It expects to POST multipart/form-data to my server. Some parts are sent as files, some are sent as text.
I want to write a test using ...
-1
votes
2
answers
117
views
AJAX file upload request will not end [closed]
I am trying to upload an image to the server but the request will not end. In DevTools, the request shows as pending while, in the backend, php is continuously writing to an ever growing file until I ...
-1
votes
2
answers
103
views
How to use Boundaries with multiple parts in multipartform data using Swift and URLSession
I am following various examples in this question to try to upload 2 things together in a multipart form request in Swift--a file and some JSON about the file. I am able to upload the file but the ...
0
votes
2
answers
99
views
How do you send FormData with Axios?
I tried the following from Node.js:
import axios from 'axios';
const axiosInstance = axios.create({});
(async () => {
const sendData = new FormData();
sendData.append('firmware', 'hello');...
0
votes
2
answers
70
views
Laravel API: PUT request with multipart/form-data returns empty request when using Swagger or Postman [duplicate]
I'm working on a Laravel 10.x project with an API that allows updating an event using a PUT /events/{id} endpoint. This endpoint accepts multipart/form-data to optionally upload an image and pdf, and ...
1
vote
1
answer
214
views
How to receive an array of objects (with IFormFile) using [FromForm] in ASP.NET Core Web API?
I'm building an ASP.NET Core Web API endpoint that needs to receive an array of complex objects via multipart/form-data. Each object includes key-value string pairs and an optional file upload. Each ...
1
vote
0
answers
35
views
Why is MultipartFile.getSize() returning 0 inside try-with-resources block when reading PDF with PDFBox?
I'm trying to get the number of pages in a PDF uploaded as a MultipartFile in my Spring Boot application. I'm using Apache PDFBox 3.0.0. Here's my method:
public int getPageCount(MultipartFile file) ...
0
votes
0
answers
55
views
multipart: NextPart: EOF Error in ServiceController.CreateService, but Test Route in main.go Works
Here's a detailed description for your GitHub issue, incorporating the information we've discussed. This provides context, the problem statement, steps to reproduce, and your observations.
package ...
0
votes
0
answers
34
views
Can I stop nginx from buffering very large requests?
I have a web app where users are allowed to upload small images (10MB max). I enforce a client_max_body_size 10MB but I noticed, nginx will happily consume a 10GB file, filing up bandwidth and the ...
1
vote
1
answer
81
views
How to bind an axios request that contains an array of files to an ASP.NET Core model that contains a List<IFormFile> variable
I have started to take advantage of Axios header option multipart/form-data so I can go utilize Typescript objects for my requests to bind to my ASP.NET Core models, however List<IFormFile> ...
0
votes
0
answers
16
views
Request.form.files issue with froala editor in angular
On the angular side we are using the Froala editor for the messaging part(like upload files) and backend services are in .NET core. Since we have created API for uploading attachment into CDN server, ...
0
votes
0
answers
30
views
req.body Undefined in Firebase Functions after Deployment (Works Locally)
I'm using Express.js with Firebase Admin SDK and deploying my backend as a Firebase Cloud Function. I'm trying to upload an image file from a frontend form (using FormData in jQuery) to the backend ...
0
votes
1
answer
57
views
form data not receiving image file for submision (ajax) [closed]
this might be silly, but not my form nor my formdata are receiving my file input's image
i want to the image to server folder using php
but my php code never receives any image.
this is my code:
<...
1
vote
0
answers
68
views
Malformed part header
I get this error:
Error: Malformed part header
when making multipart/form-data request in Node.js - no code files visible in the error.
I'm encountering a "Malformed part header" error ...
0
votes
1
answer
110
views
Inclusion of @FormDataParam annotation(s) results in 400 Bad Request (Jersey 3.1.10, Java 17, Tomcat 10) for multipart/form-data requests
I have an existing REST API (has been around for years now and I'm the original author) which has multiple end-points. I just added a new end-point for uploading files. The end-point method resource ...
0
votes
1
answer
98
views
Request body of multiple file uploads in multipart formdata with unique metadata
I'm working on a NestJS app and in it, one route has file uploading in it. I am uploading the file and its metadata using form-data. Right now, I am able to upload just one file at a time and the form-...
2
votes
1
answer
362
views
Failed to parse multipart servlet request - the request was rejected because no multipart boundary was found
Does anyone have any idea why I am getting this boundary error when submitting this multipart file?
Error:
{errCode: 4000, errMsg: "Failed to parse multipart servlet request", timestamp: ...
0
votes
1
answer
56
views
can not make a multi form post request via JS run without error
First Question
I have a route tested in insomnia which is working
The route is sent as\with multiform option
also, I have to set\change the preferences in insomnia not to validate SSL
However, I can ...
0
votes
1
answer
63
views
Quarkus REST Client - 411 Length Required when uploading file to Fortinet appliance
I'm using Quarkus to POST a file to an external Fortinet appliance. However, the service enforces strict HTTP protocol constraints and returns:
411 Length Required
The Quarkus REST client interface:
@...
0
votes
1
answer
56
views
Testing play framework controller with multipartdata
He guys,
I'm having issues with testing play controller that handles multipart form data. It expects text field and some files.
The controller uses temporary files def insert(): Action[...
0
votes
1
answer
73
views
MulterError: Unexpected field when uploading image file using Multer and Express.js
I am having trouble registering and the problem occurs when uploading an image file using Multer in my Express.js application in the form.
I am getting an error "MulterError: Unexpected field&...
0
votes
0
answers
59
views
Multiple attachments causing issue while creating REST API using Jakarta and RestEasy MultipartFormDataInput
Below is the data I am trying to save via a REST API
{
"number": "123123",
"priority": "2",
"city": "",
"notes": "",
...
0
votes
0
answers
30
views
How send as chunk POST a multipart with WebClient in Spring
Flux<DataBuffer> dataBufferFlux = DataBufferUtils.read(path, new DefaultDataBufferFactory(), 4096);
Message message = new Message();
message.setText(body);
message.setSubject(subject);
...
0
votes
0
answers
104
views
Creating an Imgur album with images in one request returns an empty album – What am I doing wrong?
I'm trying to use the Imgur API to create an album and have images attached in one request using my authenticated account. I first upload several images (which returns their image IDs), then I call my ...
0
votes
0
answers
70
views
How To Append & Send File data in a multipart react form with Django backend with Nested JSON
So, I have a form data with the corresponding JSON format
project_status: 'OPEN',
project_title: '',
project_code: '',
start_date: '',
end_date: '',
duration: '',
...
0
votes
1
answer
138
views
Cannot upload worker script using Cloudflare API: Main module name is not present in bundle
I'm trying to use this API route of the Cloudflare API to upload a worker with metadata.
I'm using Node.js 18 and Axios 0.29, with the following code:
const api = axios.create({
baseURL: '...
1
vote
1
answer
2k
views
Post multipart/form-data using pythons httpx library only form data
How do I send a POST with python HTTPX that will minic a CURL POST that works? This is to an opengear rest API. I believe it has to do something with the data field of the post.
This is the working ...
0
votes
0
answers
36
views
How to parse request object that contains FormData to get File/Blob?
I can't get image files be properly uploaded to Supabase, because I do not know how to parse request object so that I would have the right value.
this is what docs say:
For React Native, using either ...
2
votes
1
answer
940
views
OpenAPI generator multipart/form-data property wrong MIME type
I don't really have a ton of experience working with OpenAPI, so hopefully this is an easy one.
I have to work with an API that wants a CSV file alongside some identifier as a multipart/form-data ...
0
votes
0
answers
33
views
Set a Request's multipart Form without a Client dependent RequestBuilder
Context
My app separates Services from Controllers so I could easily substitutes mocked services for my unit tests.
pub trait HTTPService {
// set HTTP client, send request, handle errors,
// ...
0
votes
1
answer
28
views
How to get formdata file from httpserver request in flutter
In my flutter application I've created a http server using dart io. I'm uploading file from web frontend using formdata using fetch api call. On the server side(flutter) how to get uploaded file?
0
votes
1
answer
136
views
Sending multiple file uploads as input to Azure function app http trigger
I am trying to send multiple file uploads to a function app (http trigger). The http trigger code is below,
app = func.FunctionApp(http_auth_level=func.AuthLevel.ADMIN)
@app.route(route="...
0
votes
1
answer
58
views
Java Spring with Angular 16 uploading multiple files with JSON attached
I have an Java application running Spring and on it I have an endpoint to receive multiple files but, every time I hit it I get "415 Status".
This is my endpoint:
@PostMapping(value = "/...
1
vote
1
answer
53
views
Accessing info about file uploaded in PHP and modifying with GD
I am uploading an image that is included in the $_FILES object. However, when I attempt to get its size, I get the error that it is not a string or alternatively not a resource. How can I get the ...
-6
votes
1
answer
164
views
$_POST variable from request contains optional instead of string in PHP [closed]
The use case is a user/client sends a request to a server running PHP. I am trying to write the PHP code on the server e.g. an API endpoint to process the request.
I have existing production PHP code ...
0
votes
0
answers
319
views
feign.codec.EncodeException: Error converting request body
Tried to upload a file via Rest request using MultiPartFile. Getting the request in the controller in App A, which calls service, which then calls FeignClient to invoke different REST endpoint in App ...
1
vote
0
answers
176
views
How do I correctly send a binary file over POST to an ESP32 device from a React Native app?
I am trying to replace a Unity app with a React Native app, that communicates with a remote with an ESP32 board inside it.
The app needs to send a binary file to a Web Server created by the ESP32 and ...
0
votes
1
answer
40
views
Trouble Sending multipart/form-data with Python Requests
I'm trying to post three strings to a API/form. The webservice is called Nginx Proxy Manager if you are familiar. It don't really have API docs but it uses openapi 3.1.0. I'm trying to post to this ...
0
votes
0
answers
27
views
Multipart Request - FilePart Missing (Based on Network & Time taken)
I am submitting a multi part REST API request to a Tomcat server running on a container in AWS. The request has only one part in it, which is an unencrypted excel file. I am having a servlet Filter ...
0
votes
0
answers
72
views
sending multipart file data as byte array with customer header using rest template is showing empty multiparts at receiver side
I am sending multipart file data as byte array using ByteArrayResource with custom header for every form field.
The source class used to wrap file data
public class ...