Closed MuratovAS closed 11 months ago
I have a similar, slightly outdated/crusty thing in my dotfiles: https://github.com/Rouji/dotfiles/blob/master/bin/upl Not really sure where to put stuff like that, so I haven't put mine anywhere else yet either :thinking:
Just out of curiosity: what's the urlencode-ish stuff for? and why application/zip?
Users using languages other than English may have difficulties. On the way, there may be non-Latin characters, which will be converted by the system into codes.
Example.
This is how the path to the file in the FS looks like:
/home/user/файл.txt
the value that the script takes:
file:///home/user/%D1%84%D0%B0%D0%B9%D0%BB.txt
Curl
will not be able to find the file in that path. Therefore, you need to execute decode
Initially, I wanted to hide the application shortcut in the system. NoDisplay=true
In order not to clog the startup menu.
But at the same time, I wanted to preserve the ability to load the file through the "open with" menu, this requires the type association MimeType = application / zip
.
I mainly post zip files.
It turned out to be not very convenient and I changed the parameter NoDisplay = false
. Now MimeType can be removed.
I see. Why not just use %f instead and get rid of the url stuff?
I see. Why not just use %f instead and get rid of the url stuff?
Really. I misinterpreted %f
. I thought it was returning the filename, not the path.
Thank you
good day I wrote a small config for WM (windows manager). It adds the ability to upload files to your server directly from the context menu. The code is attached below. I have not found a place for this in your repositories. So I'll leave it here :)
It needs to be slightly modified, or rather to add checks for the system clipboard and notifications. In my case, these are
wl-copy
andnotify-send
~/.local/share/applications/x0-upload
~/.local/bin/x0-upload