support deleting files from the app and specify upload params
This commit is contained in:
77
README.md
77
README.md
@@ -15,8 +15,12 @@ Note - this requires that you leverage SimpleFileUpload-Server
|
||||
- Copy codes for easy sharing
|
||||
- Support for Android 14+ with proper foreground service implementation
|
||||
- MVC architecture for clean code separation
|
||||
- Custom upload parameters (expiry time, download limit)
|
||||
- Server-side file deletion from history
|
||||
|
||||
## Recent Updates
|
||||
- Added server-side file deletion when removing items from history
|
||||
- Added custom upload parameters for maximum downloads and expiry time
|
||||
- Added multi-select capability for dumpstate files
|
||||
- Implemented zipping multiple files into a single package for upload
|
||||
- Added in-place expandable file list to avoid popup dialogs
|
||||
@@ -31,14 +35,77 @@ Note - this requires that you leverage SimpleFileUpload-Server
|
||||
|
||||
## How to Use
|
||||
1. **Upload a File**: Tap "Select File from Storage" to pick any file from your device.
|
||||
2. **Upload a Dumpstate**: The app automatically detects Samsung dumpstate files on your device.
|
||||
3. **Multi-select Mode**: When multiple dumpstate files are detected, tap "Show Files" to view and select multiple files for upload.
|
||||
4. **Select Files**: Check multiple files to upload them as a single package.
|
||||
5. **View History**: Access your upload history from the menu to find previously uploaded file codes.
|
||||
2. **Set Upload Parameters**: When uploading, set custom parameters such as maximum downloads allowed and expiry time.
|
||||
3. **Upload a Dumpstate**: The app automatically detects Samsung dumpstate files on your device.
|
||||
4. **Multi-select Mode**: When multiple dumpstate files are detected, tap "Show Files" to view and select multiple files for upload.
|
||||
5. **Select Files**: Check multiple files to upload them as a single package.
|
||||
6. **View History**: Access your upload history from the menu to find previously uploaded file codes.
|
||||
7. **Delete From Server**: When deleting items from history, files will also be removed from the server.
|
||||
|
||||
## Upcoming Features
|
||||
- Progress tracking for large files
|
||||
- Dark mode support
|
||||
- Upload history filtering and search
|
||||
- QR code generation for quick sharing
|
||||
- Custom upload parameters (expiry time, download limit)
|
||||
|
||||
## Feature Details
|
||||
|
||||
### Custom Upload Parameters
|
||||
|
||||
The app allows you to customize how your uploads are handled on the server:
|
||||
|
||||
#### Maximum Downloads
|
||||
|
||||
- **Purpose**: Limit how many times a file can be downloaded
|
||||
- **Default**: 1 download (file is removed after first download)
|
||||
- **Options**:
|
||||
- Set to any positive number to limit downloads
|
||||
- Set to 0 for unlimited downloads
|
||||
- **How to use**: Enter your desired number in the "Maximum Downloads" field when uploading a file
|
||||
|
||||
#### Expiry Time
|
||||
|
||||
- **Purpose**: Set how long the file remains available on the server
|
||||
- **Default**: 24 hours (1 day)
|
||||
- **Maximum**: 24 hours (server-enforced limit)
|
||||
- **How to use**: Enter your desired number of hours in the "Expiry Time" field when uploading
|
||||
|
||||
#### Upload Parameter Dialog
|
||||
|
||||
When you initiate an upload (either a selected file or dumpstate), the app will present a dialog where you can set these parameters before the actual upload begins. If you don't modify the fields, the default values will be used.
|
||||
|
||||
### Server-Side File Deletion
|
||||
|
||||
The app integrates with the server's delete endpoint to remove files from the server when you delete them from your local history.
|
||||
|
||||
#### Single Item Deletion
|
||||
|
||||
When you delete a single item from your upload history:
|
||||
1. The app attempts to delete the file from the server using its upload code
|
||||
2. Regardless of server response, the item is removed from your local history
|
||||
3. You will receive feedback about whether the server deletion was successful
|
||||
|
||||
#### Bulk Deletion (Clear History)
|
||||
|
||||
When you clear all history:
|
||||
1. The app attempts to delete each file from the server
|
||||
2. All items are removed from your local history
|
||||
3. You will receive feedback about whether any of the server deletions were successful
|
||||
|
||||
#### Benefits
|
||||
|
||||
- **Privacy**: Ensures your uploaded files don't remain on the server indefinitely
|
||||
- **Resource Management**: Helps keep the server storage clean
|
||||
- **Control**: Gives you full control over the lifecycle of your uploaded files
|
||||
|
||||
#### API Integration
|
||||
|
||||
The app uses the server's delete endpoint:
|
||||
```
|
||||
DELETE /delete/<code>
|
||||
```
|
||||
|
||||
This endpoint requires the same client authentication key used for uploads. The server returns:
|
||||
- 200 OK: File successfully deleted
|
||||
- 404 Not Found: File doesn't exist (already deleted or expired)
|
||||
- 401 Unauthorized: Invalid client key
|
||||
|
||||
Reference in New Issue
Block a user