A filesystem tree to choose a download location in the Web UI

Suggestions and discussion of future versions
Post Reply
rtp
New User
New User
Posts: 1
Joined: Wed Jan 10, 2024 12:42 pm

A filesystem tree to choose a download location in the Web UI

Post by rtp »

Hello,

i'm wondering whether a certain feature would be accepted. Namely, selecting a download location in the Web UI, by introducing an additional JSON-RPC endpoint (? i don't know the terminology of JSON-RPC) that scans for directories on the filesystem. Like so:
deluge.gif
deluge.gif (505.67 KiB) Viewed 4169 times
The AUTH_LEVEL for the endpoint (or RPC method) is DEFAULT so NORMAL. Is this enough protection?

The endpoint spawns piped processes and returns the output:

Code: Select all

tree -dfJL 1 --noreport | jq <rename "name" key to "id" key; del .type; del .target; .text = file's basename>
Im packaging into a docker image based on debian so for me the above isn't a problem, if i remember correctly jq builds aren't available on windows.

Are there any security issues with this solution that i should be aware of?

Also, i could not get TreeLoader.directFn to work, is it bugged on Extjs 3.4?

Thanks for your time.
User avatar
ambipro
Moderator
Moderator
Posts: 405
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: A filesystem tree to choose a download location in the Web UI

Post by ambipro »

Being able to transverse the file system always has inherent risks, but you can always submit a PR and have Cas take a look at the proposal if you want to get this implemented. I see a benefit if its done properly, although I just use thin-client and have only looked at the WebUI here and there to debug in inspect mode for the JSON-RPC endpoint.

Can't give you much insight on the implementation, but I would expect that piping terminal output back into Python is probably not the approach to PR and would be able to be done natively in Python.

I hope I understand your post well enough to at least add something here.
novelkeny
New User
New User
Posts: 3
Joined: Sat Jan 21, 2023 6:35 pm

Re: A filesystem tree to choose a download location in the Web UI

Post by novelkeny »

Would be nice if we can have this for the thin client.
Post Reply