- Enclosing class:
- WebAPI
public static interface WebAPI.JSFile
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyDoubleProperty
Defines the progress of uploading the file.javafx.beans.property.ReadOnlyObjectProperty<File>
Contains the file, which was uploaded. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the size of the file in bytes.Returns the Object URL representing the file.default double
Gets the value of the property progress.default File
Gets the value of the property uploadedFile.This returns the file when the upload is finished.javafx.beans.property.ReadOnlyDoubleProperty
Defines the progress of uploading the file.javafx.beans.property.ReadOnlyObjectProperty<File>
Contains the file, which was uploaded.void
Starts uploading the selected file.
-
Property Details
-
progress
javafx.beans.property.ReadOnlyDoubleProperty progressPropertyDefines the progress of uploading the file. When the value is 1.0, then the upload is finished.- See Also:
-
uploadedFile
javafx.beans.property.ReadOnlyObjectProperty<File> uploadedFilePropertyContains the file, which was uploaded. It is null until progress reaches 1.0.- See Also:
-
-
Method Details
-
getFilename
String getFilename() -
getFileSize
long getFileSize()Returns the size of the file in bytes. -
getObjectURL
JSVariable getObjectURL()Returns the Object URL representing the file. The Object URL is only valid as long as the JSFile is not garbage collected. -
progressProperty
javafx.beans.property.ReadOnlyDoubleProperty progressProperty()Defines the progress of uploading the file. When the value is 1.0, then the upload is finished.- See Also:
-
uploadedFileProperty
javafx.beans.property.ReadOnlyObjectProperty<File> uploadedFileProperty()Contains the file, which was uploaded. It is null until progress reaches 1.0.- See Also:
-
getProgress
default double getProgress()Gets the value of the property progress. -
getUploadedFile
Gets the value of the property uploadedFile. -
uploadFile
void uploadFile()Starts uploading the selected file. During upload, the progress property will slowly reach 1.0. -
getUploadedFileFuture
CompletableFuture<File> getUploadedFileFuture()This returns the file when the upload is finished. Calling this method, will trigger the upload, if it hasn't started yet.- Returns:
- future of the uploaded file
-