Class StreamingFileUploadRequest
java.lang.Object
io.micronaut.objectstorage.request.StreamingFileUploadRequest
- All Implemented Interfaces:
UploadRequest
An
UploadRequest backed by a StreamingFileUpload.- Since:
- 2.7.0
-
Constructor Summary
ConstructorsConstructorDescriptionStreamingFileUploadRequest(@NonNull io.micronaut.http.multipart.StreamingFileUpload streamingFileUpload) StreamingFileUploadRequest(@NonNull io.micronaut.http.multipart.StreamingFileUpload streamingFileUpload, @NonNull String key) StreamingFileUploadRequest(@NonNull io.micronaut.http.multipart.StreamingFileUpload streamingFileUpload, @NonNull String key, @NonNull Map<String, String> metadata) -
Method Summary
Modifier and TypeMethodDescription@NonNull InputStream@NonNull StringgetKey()voidsetMetadata(@NonNull Map<String, String> metadata) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.objectstorage.request.UploadRequest
setContentType
-
Constructor Details
-
StreamingFileUploadRequest
public StreamingFileUploadRequest(@NonNull @NonNull io.micronaut.http.multipart.StreamingFileUpload streamingFileUpload) -
StreamingFileUploadRequest
public StreamingFileUploadRequest(@NonNull @NonNull io.micronaut.http.multipart.StreamingFileUpload streamingFileUpload, @NonNull @NonNull String key) -
StreamingFileUploadRequest
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein interfaceUploadRequest- Returns:
- the content type of this upload request.
-
getKey
- Specified by:
getKeyin interfaceUploadRequest- Returns:
- the file name with path.
-
getContentSize
- Specified by:
getContentSizein interfaceUploadRequest- Returns:
- the size of the file, in bytes.
-
getInputStream
- Specified by:
getInputStreamin interfaceUploadRequest- Returns:
- an input stream of the object to be stored.
-
getMetadata
- Specified by:
getMetadatain interfaceUploadRequest- Returns:
- a map with key-value pairs to be stored along the file. An empty map by default.
-
setMetadata
- Specified by:
setMetadatain interfaceUploadRequest- Parameters:
metadata- a map with key-value pairs to be stored along the file.
-