Bug 242675 - Rekonq refuses to save files remotely
Summary: Rekonq refuses to save files remotely
Status: RESOLVED FIXED
Alias: None
Product: rekonq
Classification: Applications
Component: general (show other bugs)
Version: 0.4.0
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: 0.9
Assignee: Andrea Diamantini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-24 12:43 UTC by Brendon Higgins
Modified: 2011-11-03 15:33 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brendon Higgins 2010-06-24 12:43:52 UTC
Version:           0.4.0 (using KDE 4.4.4) 
OS:                Linux

Hi,

Sometimes while browsing with my netbook I want to save a file or an image to my fileserver via sftp. Konqueror allows me to do this, but Rekonq complains: "You can only select local files."

Perhaps this is a limitation of WebKit? At any rate, the appearance is that KIO is sadly one of the KDE technologies Rekonq does not fully embrace, currently.

Peace,
Brendon

Reproducible: Always

Steps to Reproduce:
Find an image, right click to save it. Navigate to a remote folder e.g. over sftp. Click okay. Rekonq refuses to accept the path, does not save.



OS: Linux (x86_64) release 2.6.32-5-amd64
Compiler: cc
Comment 1 Panagiotis Papadopoulos 2010-06-24 16:53:55 UTC
Could you please update to a more recent rekonq version? (e.g. 0.4.95 or compile it directly from the git repository) There were tons of bugfixes, and your bug might be fixed too.
Comment 2 Yoann Laissus 2010-08-24 14:56:53 UTC
It doesn't work for me too.

rekonq 0.5.81
Comment 3 Harald Sitter 2010-08-24 14:58:14 UTC
+1
Comment 4 Andrea Diamantini 2010-08-25 15:51:49 UTC
I'm not 100% sure about this, but I think this should be impossible (or very tricky) without using kparts.
And in general, our main design is being just a "browser", not a "file manager". That's our main difference with konqueror and I expext you cannot do this also with Firefox, Opera, Chrome, etc...
Comment 5 Brendon Higgins 2010-08-26 02:24:39 UTC
Caveat: This is based on my limited understanding of the foundational KDE components. But I would think this is possible using just KIO. Does KIO require KParts? Does rekonq not use KIO for accessing the http protocol?
Comment 6 Harald Sitter 2010-08-28 13:39:19 UTC
That has absolutely nothing to do with KParts?!

Also there is nothing tricky about using a function that supports non-local files...

const QString destUrl = KFileDialog::getSaveUrl(name, QString(), this, QString(), KFileDialog::ConfirmOverwrite).url();
Comment 7 Andrea Diamantini 2010-08-28 18:55:51 UTC
(In reply to comment #6)
> That has absolutely nothing to do with KParts?!
> 
> Also there is nothing tricky about using a function that supports non-local
> files...
> 
> const QString destUrl = KFileDialog::getSaveUrl(name, QString(), this,
> QString(), KFileDialog::ConfirmOverwrite).url();

Uhm.. I probably explained myself badly. 
Let's say you are browsing a local path, copy a file and you wanna save (paste) it in a remote dir. This operation (tipical in file managers) is not implemented in rekonq and the easiest way I'm aware to implement it is using a kpart.
Now, let's say you are browsing a local file (eg: $HOME/foo.pdf) and you wanna save it in a remote dir (sftp://bar/code/etc..). You select the "save as" action in the tools menu, browse to the remote dir with the save dialog and then press save. This operation has nothing to do with kparts and can be implemented with the code you pointed out. Quite the same of the saveas rekonq function.
So, what's the requested use case? The first one is a WONTFIX, while the second one should work out of the box. 
Waiting your reply, I'm going to try a save in my web space :)
Comment 8 Harald Sitter 2010-08-28 20:20:24 UTC
Even for the first presented use case you supposedly just need to get a KIO job started that copies the URL gathered from a local browsing location to a remote one (well, plus drag tracking and/or context menu foo). IMHO that is how ever simple it might be to do, indeed outside the scope of Rekonq.

But from the original steps for reproducing the issue I gather saving a random object of a website (or the website itself for that matter) onto a remote location is the desired functionality here.

>Steps to Reproduce:
> Find an image, right click to save it. Navigate to a remote folder e.g. over
> sftp. Click okay. Rekonq refuses to accept the path, does not save.

Which makes sense when you for example have a sophisticated Samba setup (think company) and one person wants to quickly share something she found on the web with another person -> this might very well happen via smb://foo/all.
Comment 9 ren 2011-06-16 02:56:14 UTC
This is a pretty annoying bug that didn't exist in Konqueror. Here's one example: I have a home theater PC in my living room and a KDE desktop computer in my office. From my office, I'd like to right-click -> "Save link..." on a .torrent or video file that's linked from someone's web page and save it straight to my HTPC in one step.

I can easily set up an entry in the "Places" menu on the left side of the Rekonq Save As dialog for my HTPC (using sftp), and I can click on that entry to browse through its folders... but when I click save, it gives me an error. Why even let me browse there then?

Thi has nothing to do with being a file manager... most other KDE applications can "save as" to remote locations just fine. Examples include Kate, KolourPaint, Krita, K3b, and of course Konqueror. The programs that do share this error are generally non-KDE such as Firefox and LibreOffice so I'm more forgiving of those ones when they don't play nice with the KDE dialogs... but if Rekonq is supposed to be "the KDE browser" this should be fixed.
Comment 10 Andrea Diamantini 2011-06-16 17:51:14 UTC
Oh my God, I'm really sorry to say I completely misunderstood the problem until... now! I tried a similar case and I can fully confirm the bug. Also if the problem seems a bit mysterious: IMHO this should work out of the box.
Targetting this for... the evening!
Comment 11 Andrea Hailes 2011-11-02 00:08:34 UTC
Still not working, in Kubuntu 11.10; Rekonq 0.8.

Has there been any developer activity on this bug?
Comment 12 Andrea Diamantini 2011-11-02 16:24:27 UTC
Yes. I checked konqueror code and compared with rekonq one about this. They look pretty similar...
Comment 13 Andrea Hailes 2011-11-02 23:40:23 UTC
Pretty similar, yet not the same; Rekonq still won't save a file over a remote directory.

I'm not sure what's going on here; surely Rekonq uses the file:// kioslave to save locally, what's stopping it using, say, the smb:// or ftp:// or webdav:// kioslaves?
Comment 14 Andrea Diamantini 2011-11-03 15:33:54 UTC
Git commit bec0deb0925091d2b26038deed730c72af9c0a37 by Andrea Diamantini.
Committed on 03/11/2011 at 16:25.
Pushed by adjam into branch 'master'.

Let rekonq save file remotely

Andreas's comment was helpful: rekonq COULD save file remotely, but
for same strange reason, KFileDialog::getSaveFileName() could not
select remote files. Switching to getSaveUrl seems fixing the problem

Ah... also a style clean up here. Sorry for the merged commit...

BUG: 242675

M  +3    -3    src/mainwindow.cpp
M  +1    -1    src/settings/webkitwidget.h
M  +3    -3    src/tabbar.cpp
M  +6    -6    src/urlbar/urlbar.cpp
M  +1    -1    src/urlbar/urlresolver.cpp
M  +1    -1    src/webpluginfactory.cpp

http://commits.kde.org/rekonq/bec0deb0925091d2b26038deed730c72af9c0a37