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
ConstructorDescriptionStreamingFileUploadRequest
(@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 String
getKey()
void
setMetadata
(@NonNull Map<String, String> metadata) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
getContentType
in interfaceUploadRequest
- Returns:
- the content type of this upload request.
-
getKey
- Specified by:
getKey
in interfaceUploadRequest
- Returns:
- the file name with path.
-
getContentSize
- Specified by:
getContentSize
in interfaceUploadRequest
- Returns:
- the size of the file, in bytes.
-
getInputStream
- Specified by:
getInputStream
in interfaceUploadRequest
- Returns:
- an input stream of the object to be stored.
-
getMetadata
- Specified by:
getMetadata
in interfaceUploadRequest
- Returns:
- a map with key-value pairs to be stored along the file. An empty map by default.
-
setMetadata
- Specified by:
setMetadata
in interfaceUploadRequest
- Parameters:
metadata
- a map with key-value pairs to be stored along the file.
-