Package io.vertx.mutiny.ext.web
Class FileUpload
- java.lang.Object
-
- io.vertx.mutiny.ext.web.FileUpload
-
public class FileUpload extends Object
Represents a file-upload from an HTTP multipart form submission.original
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<FileUpload>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description FileUpload(io.vertx.ext.web.FileUpload delegate)
FileUpload(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel()
String
charSet()
String
contentTransferEncoding()
String
contentType()
io.smallrye.mutiny.Uni<Void>
delete()
Delete the uploaded file on the disk.Void
deleteAndAwait()
Blocking variant ofdelete()
.void
deleteAndForget()
Variant ofdelete()
that ignores the result of the operation.boolean
equals(Object o)
String
fileName()
io.vertx.ext.web.FileUpload
getDelegate()
int
hashCode()
String
name()
static FileUpload
newInstance(io.vertx.ext.web.FileUpload arg)
long
size()
String
toString()
String
uploadedFileName()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<FileUpload> __TYPE_ARG
-
-
Constructor Detail
-
FileUpload
public FileUpload(io.vertx.ext.web.FileUpload delegate)
-
FileUpload
public FileUpload(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.web.FileUpload getDelegate()
-
name
public String name()
- Returns:
- the name of the upload as provided in the form submission
-
uploadedFileName
public String uploadedFileName()
- Returns:
- the actual temporary file name on the server where the file was uploaded to.
-
fileName
public String fileName()
- Returns:
- the file name of the upload as provided in the form submission
-
size
public long size()
- Returns:
- the size of the upload, in bytes
-
contentType
public String contentType()
- Returns:
- the content type (MIME type) of the upload
-
contentTransferEncoding
public String contentTransferEncoding()
- Returns:
- the content transfer encoding of the upload - this describes how the upload was encoded in the form submission.
-
charSet
public String charSet()
- Returns:
- the charset of the upload
-
cancel
public boolean cancel()
- Returns:
true
when the upload was cancelled,false
when the upload is finished and the file is available
-
delete
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> delete()
Delete the uploaded file on the disk.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
deleteAndAwait
public Void deleteAndAwait()
Blocking variant ofdelete()
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
deleteAndForget
public void deleteAndForget()
-
newInstance
public static FileUpload newInstance(io.vertx.ext.web.FileUpload arg)
-
-