1,896 questions
0
votes
0
answers
47
views
How to automatically convert FormData types in Next.js Server Actions without manual parsing?
I'm using Next.js 14 with Server Actions and I'm tired of manually parsing and converting FormData values. Every action looks like this:
'use server'
export async function createUser(formData: ...
-1
votes
1
answer
87
views
How to fix Post validation failed: title: Cast to string failed - formidable (Node)
I'm making a POST request to create a blog post and I'm using formidable to upload an img for each post but I'm receiving a 400 error:
Post validation failed: title: Cast to string failed for value &...
0
votes
0
answers
27
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 ...
3
votes
1
answer
299
views
How to pass a List of strings as FormData to FastAPI using JavaScript Fetch API?
This is the Next.js frontend:
// Create FormData to send files, URLs and username to the API
const formData = new FormData();
if (files && files.length > 0) {
files.forEach((file) =>...
0
votes
1
answer
52
views
Postman form-data file to Powershell issue
So i have API that works ok in Postman with Body type form-data where i am providing a json file.
I am trying now to execute the same API in Powershell, however i keep getting error ...
0
votes
1
answer
50
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
0
answers
40
views
Access formData in response from Pardot Data Forwarding
How do I access the Form Data Payload with Javascript. Pardot's Data Forwading has sent the data and I can see it in Chrome Dev Tools. Network > Payload, but I can't access it with Javascript.
...
0
votes
0
answers
96
views
How to send data from react js to a node js server?
So this is my server.js:
const express = require("express");
const multer = require("multer");
const cors = require("cors");
const admin = require("firebase-admin&...
0
votes
0
answers
41
views
How to read Form Data in JAX RS response?
Problem: I have to make JAX RS client call for GET HTTP method. But, the response is a Form data. I need help in knowing how to read the response which is of type FormData.
Ex:
ClientConfig config = ...
0
votes
1
answer
54
views
Form Submission (cutom object not FormData) through Ajax in ASP .NET Core MVC
I am trying to submit form data through an Ajax call and not passing FormData, but instead passing a custom object in the Ajax call.
This is my ajax call:
function submitData() {
let isValid = ...
0
votes
0
answers
18
views
How to use multipart/form-data with requests session? [duplicate]
I want to send data with requests as form-data. I use the request's session. However, it still send the data in application/x-www-form-urlencoded form. I started a test servver with nc -kdl 8000.
...
0
votes
0
answers
67
views
Laravel File Upload with Nested Form-Data Returns Empty Files Array in Request [POSTMAN]
I’m working on a Laravel API that allows users to upload files as part of a nested form-data request. However, the files are not being detected properly in the request. Below is my current setup:
...
1
vote
1
answer
308
views
How can i pass null as a value instead of "null" in formData?
const formData = new FormData();
const fields = {
title: bookingTitle,
image: image,
phone_number: phone || null
};
Object.entries(fields).forEach(([key, value]) => {
...
2
votes
2
answers
133
views
Is it possible to send an array of FormData objects in an httpClient.post?
I have an Angular frontend app with a Java backend in which the user select a document and then saves it.
To do this, I've been sending a FormData object from the frontend to the backend with no ...
0
votes
1
answer
92
views
Why exchanging between javascript FormData and PHP, does not work?
I don't understand. I have the following JavaScript function that sends a blob object to PHP side:
function createDownloadLink(blob,encoding) {
fetch('https://localhost:443/process.php', {...
1
vote
0
answers
16
views
To enable auto-completion for the data object when converting FormData to an object in TypeScript
When converting FormData to an object in TypeScript, the resulting data does not have auto-completion for its properties.
import React, { useState } from 'react';
export default function Signup() {
...
0
votes
3
answers
87
views
sending image file using ajax to controller action getting null value in action parameter asp.net core
Hi there to all of you.
When I attempt to upload an image file using an Ajax call and send it to the controller action (asp.net core), sometimes I get an image file and sometimes get a null value in ...
0
votes
1
answer
60
views
Binding nullable int to a null-string value in form-data
I'm upgrading from .NET classic to .NET Core 8 on a backend - it would be preferable to not have to change the frontend (even if it would be far better, this is beyond the scope of this project which ...
1
vote
2
answers
69
views
How to append List to FormData in JQuery?
I get model's values from view with this codeblock and this part is OK.
var data = new FormData();
var datas = $(this).serializeArray();
for (var i = 0; i < datas.length; i++) {
data.append(...
1
vote
2
answers
719
views
Sending data to the Spring Boot backend with FormData and RequestParam not working
So I am struggling for a while with sending files and other data to the backend with FormData in the frontend and RequestParam in the backend. I tried so many different things and I have searched so ...
1
vote
2
answers
424
views
laravel inertia invoking the update handeler not working (with file upload)
i dont think this is a good title but imma explain my situation
im using laravel with inertia, everything works fine ive never had such experiance with a framework
im building a quick demo to learn ...
0
votes
1
answer
296
views
Payload empty when send as new FormData()
I'm trying to pass images to my node server but whatever i'm trying the payload is constantly empty when I pass it as a const formData = new FormData();, as regular I do get the correct informations (...
1
vote
1
answer
52
views
After sending form with AJAX, the $_POST looks empty
I'm trying to send my form input with AJAX in JS.
The actual code looks like this:
const form = document.querySelector('#login');
form.addEventListener('submit', function (event) {
event....
0
votes
0
answers
104
views
Angular file upload is slower than postman
I have one nodejs API which is taking formdata file as an input and uploads video file into my disk
from postman i am making POST request with 700MB file which is uploading as expected speed
but ...
1
vote
1
answer
150
views
Not able to upload File in angular 17.0.7
when i am trying to send the file to backend server i data is going empty
i am using FormData and using append method to insert data into FormData , but when i console and see i am getting empty ...