Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto save recieved files #1966

Open
shpoongle opened this issue May 12, 2024 · 6 comments
Open

Auto save recieved files #1966

shpoongle opened this issue May 12, 2024 · 6 comments

Comments

@shpoongle
Copy link

When a file is received the link is usually so long that you need to reduce the font size of the terminal to select the link. It would be great if there was an option that received files could just autosave to a predetermined folder. :)

Expected Behavior

A simple option to select autosave received files yes/no and which directory to save #them.

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

This is literally the only issue (from my personal perspective) that keeps me from using profanity.

Environment

  • Give us the version and build information output generated by profanity -v
  • If you could not yet build profanity, mention the revision you try to build from
  • Operating System/Distribution
  • glib version
  • libstrophe version
  • Some bugs might be due to specific implementation in the server. /serversoftware example.domain can be helpful
@jubalh
Copy link
Member

jubalh commented May 12, 2024

When a file is received the link is usually so long that you need to reduce the font size of the terminal to select the link.

How about using: /url save <tab>? :)

Autosaving files that someone sends you sounds like a bad idea.

@sjaeckel
Copy link
Member

I can understand the desire for that feature, it's basically how all other clients work ...

Autosaving files that someone sends you sounds like a bad idea.

We could make it configurable to auto save only for e.g. contacts in your roster and "private MUCs".

Three settings, autosave.{1on1,muc,pm} with different TBD levels!? Or sth. in that direction. We'll have to think about the exact details.

@shpoongle
Copy link
Author

How about using: /url save <tab>? :)

Was unaware of this and yes it certainly is extremely helpful

I can understand the desire for that feature, it's basically how all other clients work ...

It really does make life massively easier, it's the little things like this that just make the software itself more polished and also massively improve productivity for the end user. (imo)

@jubalh
Copy link
Member

jubalh commented May 15, 2024

it's basically how all other clients work

mcabber for sure isn't. Neither is poezio and aparte.
Conversations has a setting to auto download depending on size but AFAIK the default is not to auto download. I'm not sure about Gajim. Dino seems to autodownload though.

For GUI clients it might make sense, since they embed (for example) images in their widget.

I'm not against a setting for it though. If someone wants to implement such a feature.

@jubalh
Copy link
Member

jubalh commented Jun 20, 2024

I guess there should be a file extension white list. We can't predict the real filetype but probably adding this will help anyways a bit. So that only files that are uploaded via http_upload and end in *.jpg, *.png are downloaded automatically and not links to websites.

This probably needs to be done in wins_add_urls_ac() or that function needs to be renamed to better reflect what it's doing then.

Inside we need to check the setting if the user wants to autodownload files (PREF_xxx) and if yes, check whether the link matches the whitelisted format.

Then it should download files like in cmd_url_save(). Probably some parts of that function need to be put inside a helper function and called by both.

@shpoongle
Copy link
Author

I agree that not adding links to websites to auto download makes sense. I would tentatively suggest that the filetypes that should be auto downloaded should be *.jpg *.png *.mp4 and *.mp3 this covers the three things that are sent most commonly, pictures videos and voice messages. - Sorry for the huge delay on response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants