Class FileUploadRequest
java.lang.Object
io.micronaut.objectstorage.request.AbstractUploadRequest
io.micronaut.objectstorage.request.FileUploadRequest
- All Implemented Interfaces:
UploadRequest
Upload request implementation using
File
.-
Field Summary
Fields inherited from class io.micronaut.objectstorage.request.AbstractUploadRequest
contentType, metadata
-
Constructor Summary
ConstructorDescriptionFileUploadRequest
(@NonNull String keyName, @Nullable String contentType, @NonNull Path path, @NonNull Map<String, String> metadata) FileUploadRequest
(@NonNull Path localFilePath) FileUploadRequest
(@NonNull Path localFilePath, @NonNull String keyName, @Nullable String prefix, @Nullable String contentType) FileUploadRequest
(@NonNull Path localFilePath, @Nullable String prefix) -
Method Summary
Methods inherited from class io.micronaut.objectstorage.request.AbstractUploadRequest
getMetadata, setContentType, setMetadata
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
getMetadata, setContentType, setMetadata
-
Constructor Details
-
FileUploadRequest
-
FileUploadRequest
-
FileUploadRequest
-
FileUploadRequest
-
-
Method Details
-
getFile
-
getPath
- Returns:
- The underlying
Path
.
-
getAbsolutePath
- Returns:
- The absolute path of the underlying
Path
.
-
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.
-