public interface FileUpload
MediaType.MULTIPART_FORMDATA
. Example:
{
post("/submit", ctx -> {
FileUpload file = ctx.file("myfile");
});
}
Modifier and Type | Method and Description |
---|---|
byte[] |
bytes()
Content as byte array.
|
void |
destroy()
Free resources, delete temporary file.
|
String |
getContentType()
Content type of file upload.
|
String |
getFileName()
Name of file upload.
|
long |
getFileSize()
File size.
|
Path |
path()
File system path to access file content.
|
InputStream |
stream()
Content as input stream.
|
@Nullable String getContentType()
@Nonnull InputStream stream()
@Nonnull byte[] bytes()
@Nonnull Path path()
long getFileSize()
void destroy()
Copyright © 2020. All rights reserved.