You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// FIXME: Old method of getting the parts // Hugi 2025-07-19
280
-
// MultiPartFormData.onParts( jettyRequest, jettyRequest, contentType, config, new Promise.Invocable<MultiPartFormData.Parts>() {
281
-
//
282
-
// @Override
283
-
// public void succeeded( MultiPartFormData.Parts parts ) {
284
-
// parts.forEach( p -> {
285
-
// final String partContentType = p.getHeaders().get( HttpHeader.CONTENT_TYPE );
286
-
//
287
-
// final String parameterName = p.getName();
288
-
// final String parameterValue;
289
-
//
290
-
// // We're assuming that if this part does not have a content type, it's a regular ol' form value, to be added to the requests formValues map as usual.
291
-
// if( partContentType == null ) {
292
-
// parameterValue = p.getContentAsString( StandardCharsets.UTF_8 ); // FIXME: Hardcoding the character set is a little presumptuous // Hugi 2025-04-05
293
-
// }
294
-
// else {
295
-
// // We're generating a unique ID here to store the attachment under in the request. This value will be stored in the request's formValues, and can be used to fetch the uploaded data in the request's uploadedFiles map
296
-
// final String uniqueID = UUID.randomUUID().toString();
297
-
//
298
-
// parameterValue = uniqueID;
299
-
//
300
-
// // Now we add the uploaded file to the request
301
-
// final UploadedFile file = new UploadedFile( p.getFileName(), partContentType, Content.Source.asInputStream( p.getContentSource() ), p.getLength() );
302
-
// uploadedFiles.put( uniqueID, file );
303
-
// }
304
-
//
305
-
// List<String> list = formValues.get( parameterName );
306
-
//
307
-
// if( list == null ) {
308
-
// list = new ArrayList<>();
309
-
// formValues.put( p.getName(), list );
310
-
// }
311
-
//
312
-
// list.add( parameterValue );
313
-
// } );
314
-
// }
315
-
//
316
-
// @Override
317
-
// public void failed( Throwable failure ) {
318
-
// // FIXME: This is here temporarily for some debugging. We should have better error handling overall for multipart uploads // Hugi 2025-07-19
0 commit comments