Questions tagged [multipartfile]

127 questions
0
votes
1 answer

How can I parse JSON with this structure(multipart file)?

My java spring boot app is sending JSON that includes a multi-part file, which I need to parse(using angular) in order to target 'picture" inside of "fileupload" when GET is called. Here is the JSON coming to UI when GET is called: { "id":…
0
votes
2 answers

Trying to save a file in springboot as an optional

I am trying to save a file as an optional in springboot with extra data. So the user should have the option to add an image or not to add an image. I recieve an no value error when there is no image. Everything saves fine when there is an…
user16071339
0
votes
1 answer

Access Custom S3 Metadata After Completing Multipart Upload

I'm wanting to access the custom metadata for an object uploaded via the S3 multipart upload after firing off the completeMultipartUpload method. I initiate a multipart S3 upload with some added custom metadata like so: $response =…
Josh
  • 714
  • 2
  • 8
  • 20
0
votes
0 answers

Using MultipartFile in flutter to send many images with id foreach item

I am trying to send a list of images using the MultipartFile, the sending is done according to the id and the key of each image ... the problem, I am told that: Unhandled Exception: type '_InternalLinkedHashMap' is not a subtype of…
0
votes
0 answers

I have to make a call in server uploading multipartData but i got this problem

This is my code but i get this error : [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Content size exceeds specified contentLength. 17282 bytes written while expected 398. uploadFile(File imageFile,String id,LoginResponseModel…
Ergi16
  • 13
  • 2
0
votes
1 answer

How would you Http-Post a MultipartFile?

I am trying to build a file-uploader with Java/Spring-boot/Vaadin. https://vaadin.com/components/vaadin-upload/java-examples That Uploader gives me a MemoryBuffer. How can I post this to my backend, which looks like…
Varric
  • 11
  • 1
0
votes
1 answer

I get larger sizes after cropping the image

I have never worked with pictures in java and I am a beginner in this. I need to make a function that will crop the images according to a certain ratio of width and height in the middle of the image. Through REST Api I receive a MultipartFile which…
Ante Ereš
  • 623
  • 4
  • 8
  • 24
0
votes
1 answer

Fazer Upload Multipart usando Java SpringBoot

How to upload files received in the API? Using springboot java and send to a directory via http url, from cpanel for example. I did it using aplication.properties and saved it in a local directory, but I would like to know how to save it now in a…
0
votes
1 answer

Springfox swagger - content type multipart/form-data

I have an API for uploading multiple files with below signature - takes in a list of multipart files and a request object. @ApiOperation(consumes=MediaType.MULTIPART_FORM_DATA_VALUE) @PostMapping("/upload") public void…
Farhan
  • 411
  • 1
  • 10
  • 23
0
votes
0 answers

How can I add multiple files with 2 fields in Springboot

My request DTO : @Getter @Setter public class FileUploadRequestDTO { private MultipartFile fileMap; private String filetype; private String fileNature; } // Controller method @RequestMapping(path = FLAT_FILE_UPLOAD, method =…
0
votes
0 answers

Ruby POST multipart/form-data results in 302 Found

I am trying to upload a csv file to my endpoint. I tried doing this and resulting in 302 Found. Tried other solution mentioned here: Multipart POST Ruby HTTPS but same results. First option using net/http url =…
Esh Val
  • 3
  • 3
0
votes
0 answers

Transferring and saving MultipartFile instance

I have the following method, with the simple aim to store the contents of a given MultipartFile instance under a specified directory: private void saveOnDisk(final String clientProductId, final MultipartFile image, final String parentDirectoryPath,…
Jason
  • 2,495
  • 4
  • 26
  • 37
0
votes
1 answer

Flutter: upload Image error via API function

I'm trying to upload images and some data via API from my app and I have no error in my console and I don't know what's wrong with my function. This is the code which I use: upload(File imageFile) async { var user = …
Mariam Younes
  • 389
  • 6
  • 29
0
votes
1 answer

Converting contents to Base64 and sending to Spring method expecting MultiPartFile

Because of server issues I need to convert the contents of a file upload to Base64 before it gets submitted to the server. I've managed the JS side of things using reader.readAsDataURL to get the contents into Base64 in a local JS variable. I've…
RobM
  • 1
  • 2
0
votes
0 answers

Android File Upload - Retrofit Multipart with backend as Java Rest API

Could you please help me with the Multipart Retrofit file upload with backend java rest api(mysql db). I tried with the below code but it is not working.. Retrofit part Activity.java private void checkingst(File file){ RequestBody requestBody =…
Sanjeev
  • 21
  • 2
1 2 3
8
9