b67024ab0673788cca34cfc7f89b6032d1689264
The previous implementation used a hardcoded offset of `len("here: ")` from the start of the string after `"here:"`, which would fail if the URL appeared at a different position or if the message structure changed. This commit replaces the brittle slice with a dynamic `str.find()` call to locate the `"here: "` substring, ensuring the URL is correctly extracted regardless of its position in the message. The fix applies to the `handle_index` handler in `src/rupload/app.py`.
RUpload
Easiest file manager for your server made for public use.
It doesn't have captcha or whatsoever. It's designed for public use, as long the domain isn't listed in a search engine. It has a limitation for file size, that's it's only security. Rate limiting is in consideration. The default file size is 50Mb. The default storage quota for whole directory is 10Gb. Default config will prevent your server for heavy abuse.
Installation
python3 -m venv .venv
./venv/bin/python -m pip install .
Usage
rupload.serve [-h]
[--hostname HOSTNAME]
[--port PORT]
[--upload_folder UPLOAD_FOLDER]
[--upload_url UPLOAD_URL]
[--max_file_size MAX_FILE_SIZE]
Start the file upload server.
options:
-h, --help show this help message
and exit
--hostname HOSTNAME The hostname for the
server.
--port PORT The port to bind the
server to.
--upload_folder UPLOAD_FOLDER
Directory to store
uploaded files.
--upload_url UPLOAD_URL
HTTP(S) URL where the
server will serve the
uploaded files.
--max_file_size MAX_FILE_SIZE
Maximum file size in
bytes (default is
50MB).
Languages
Python
97.6%
Makefile
2.4%