Advanced Multipart File Upload with Real Progress
Author: Zuhaib
com.zebdroid.filelift.aix (27.8 KB)
Built with Java + Fast CLI
What it does
FileLift (v4, versionName 2.0) uploads one or many files to any API endpoint in a single multipart/form-data request — one-call style: everything (paths, field names, extra text fields, headers) goes into one Upload block, no separate queueing blocks needed.
Key features
-
Single or multiple files per request, same or different field names per file
-
Accepts both plain file paths and modern
content://URIs from gallery/file pickers — auto-detects which, and copies to a temp cache file only when the content provider doesn't already report an exact size (so progress is always real, not simulated) -
Automatic filename & MIME-type detection (via
OpenableColumns/MimeTypeMap, falling back toapplication/octet-stream) -
Real, non-simulated upload progress — byte counts come from what's actually been written to the socket
-
Cancel one upload or all uploads mid-flight (
CancelUpload/CancelAllUploads), disconnects the liveHttpURLConnectionand firesUploadCancelled -
Headers and extra form fields passed as dictionaries, not separate blocks
-
Fully background, non-blocking network I/O (
ExecutorService), safe for many concurrent uploads tracked by your own Request ID
Blocks / API
Properties
-
ConnectTimeout(ms, default 15000),ReadTimeout(ms, default 30000)
Functions
-
Upload(requestId, url, files, fieldNames, formData, headers) -
CancelUpload(requestId),CancelAllUploads()
-
IsUploading(requestId) -
GetUploadedBytes(requestId),GetTotalBytes(requestId),GetProgressPercentage(requestId) -
ActiveRequestIds()— list of currently-uploading Request IDs
Events
-
UploadStarted(requestId)— fires after every file is validated and sizes are known -
UploadProgress(requestId, uploadedBytes, totalBytes, percentage) -
UploadCompleted(requestId, responseCode, responseBody)— checkresponseCodeyourself; a non-2xx status can still carry a useful body -
UploadError(requestId, errorMessage)— human-readable (no internet, timeout, bad URL, file not found, etc.) -
UploadCancelled(requestId)
Dependencies: none beyond standard Android APIs (no external SDK/jar required)
Credits: original implementation, no third-party extension code reused
Price: Free








