public interface FileUploadProgress
HttpsFileUploader.
Note that it is perfectly possible to receive the callbacks in
this class even if the upload is failing. Therefore it is important
that the result of the upload operation, HttpsFileUploaderResult, is
always checked.
| Modifier and Type | Method and Description |
|---|---|
void |
uploadEnd(long totalSizeAll,
long msecondsUsed)
Informs that the upload operation has completed.
|
void |
uploadProgress(File file,
long totalSize,
int pct)
Informs about file upload progress for a given file.
|
void |
uploadStart(int noOfFiles,
long totalSizeAll)
Informs that an upload operation is about to begin.
|
void uploadStart(int noOfFiles,
long totalSizeAll)
noOfFiles > 1.noOfFiles - the number of files that will be uploaded in this
upload operation.totalSizeAll - the total number of file bytes that will be sent
in this upload operation (the sum of the size of all files in the
upload operation)void uploadProgress(File file, long totalSize, int pct)
The same percentage will never be reported twice. For each file being uploaded there will be between 2 (one for "0%" and one for "100%") and maximum 101 invocations of this method. There will always be a "0%" and a "100%" invocation. The "0%" invocation can effectively be interpreted as a file is about to be uploaded while the "100%" invocation can be interpreted as the the upload for that file has been completed.
Regarding multi-file uploads: Files are uploaded sequentially and in the
order they are specified in the
uploadFiles map.
This callback is about a single of each such file upload. Therefore the
values in totalSize and pct relate only to this single
file upload and not the whole upload operation.
For very small files (below 8K) there will only be a "0%" and a "100%" invocation as such file is uploaded in a single write operation.
file - local file currently being uploadedtotalSize - total number of bytes to be sent in the upload (size in
bytes of the current file being uploaded)pct - upload progress in percentage. Value between 0 and 100.void uploadEnd(long totalSizeAll,
long msecondsUsed)
totalSizeAll - the total number of file bytes that was sent
in this upload operation (the sum of the size of all files in the
upload operation)msecondsUsed - number of milliseconds used on the file upload
operationCopyright © 2015 Addicticks. All rights reserved.