Class CompletedFileUploadRequest
java.lang.Object
io.micronaut.objectstorage.request.CompletedFileUploadRequest
- All Implemented Interfaces:
UploadRequest
An
UploadRequest
backed by a CompletedFileUpload
.- Since:
- 1.0
- Author:
- Álvaro Sánchez-Mariscal
-
Constructor Summary
ConstructorDescriptionCompletedFileUploadRequest
(@NonNull io.micronaut.http.multipart.CompletedFileUpload completedFileUpload) CompletedFileUploadRequest
(@NonNull io.micronaut.http.multipart.CompletedFileUpload completedFileUpload, @NonNull String key) CompletedFileUploadRequest
(@NonNull io.micronaut.http.multipart.CompletedFileUpload completedFileUpload, @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
-
CompletedFileUploadRequest
public CompletedFileUploadRequest(@NonNull @NonNull io.micronaut.http.multipart.CompletedFileUpload completedFileUpload) -
CompletedFileUploadRequest
public CompletedFileUploadRequest(@NonNull @NonNull io.micronaut.http.multipart.CompletedFileUpload completedFileUpload, @NonNull @NonNull String key) -
CompletedFileUploadRequest
-
-
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.
-