"Copy file location" vs "Show file"

Hi,

Would it be possible to add a "Copy file location" right-click option for file attachments (e.g. a PDF)? This would be analogous to Firefox' "Copy link location".

"Show file" works great for drag&drop operations. However, if I want to send the file in an email to someone (e.g. with gmail), I need to copy&paste the location of the file, which is not straightforward right now. The other option would be to navigate Zotero's directory structure using "Browse", a big no-no.

Another scenario: as many people I know, I work a lot in a shell. If I want to manipulate an attachment, even a simple copy, without a "Copy file location" option, I am left to searching for the attachment on the cryptic directory structure.

I haven't been able how to do this, nor have I seen anything in the forum. If I missed something, please let me know.

Thanks, and keep up the great job!
Rodrigo
  • How is Show File not sufficient for all of this?
  • edited April 6, 2010
    To clarify: you don't say what OS you're on, but on Windows there's an option to have Explorer windows show the full path. On OS X, you can copy the path from Get Info, or you could use an AppleScript or some other method. There are also programs on OS X that you can add to the Finder sidebar to open a Terminal window from the current window.

    Really, of course, your mail issue is a limitation of web-based mail clients, since this isn't a problem with regular mail clients (to which you can drag from the filesystem window). I think HTML5 provides ways for web apps to support drag-and-drop of external files, so I wouldn't be surprised if Gmail added support for dragging in attachments soon.
  • Hi Dan,

    I liken it to the difference between opening a link on Firefox and then copying the URL from the location bar versus right-clicking "Copy link location". True, the file browser does not open the file itself, but you do open the file browser.

    On my Mac at the lab I have to go to the opened file browser window and then drag and drop the file where I need it.

    On my Linux box at home, I don't use a file browser, so nothing is opened with "Show file" and I cannot access the file path. I agree that not using a file-browser is a personal choice. However, even in the Mac, I would like to copy the path without more need of a mouse.

    In both scenarios, a single "Copy file location" function as in Firefox would leave the link in the clipboard for a quick Ctrl-V to anywhere you may like it.

    Cheers,
    Rodrigo
  • edited April 6, 2010
    I liken it to the difference between opening a link on Firefox and then copying the URL from the location bar versus right-clicking "Copy link location". True, the file browser does not open the file itself, but you do open the file browser.
    Right, but I'm saying that this is an issue for the file browser, not for Zotero. The vast majority of people have no need for file paths, so I don't see this as something that should be added to Zotero.
    On my Mac at the lab I have to go to the opened file browser window and then drag and drop the file where I need it.
    To do what with it? If you want to copy it somewhere, you can just drag it straight from Zotero. If you want to do something else with it, clicking Show File is a pretty minimal step, and how would a file path help anyway?
    In both scenarios, a single "Copy file location" function as in Firefox would leave the link in the clipboard for a quick Ctrl-V to anywhere you may like it.
    To where, though?
  • "To do what with it? If you want to copy it somewhere, you can just drag it straight from Zotero. If you want to do something else with it, clicking Show File is a pretty minimal step, and how would a file path help anyway?"
    As I said, any shell operation to the file requires the file path, e.g.: to scp the PDF to another computer; to attach the file to a mail sent with mutt/pine; to run a shell script that prints a PDF in a certain way; to soft-link the file to another directory; and plenty of other examples.

    Drag&Drop from Zotero to a shell (Mac) copies the following:
    1. "name_of_pdf_without_path.pdf"
    which is not useful.

    Drag&Drop from Zotero to a shell in Linux (at least my install) does nothing.

    You mention a limitation on webmail clients as "regular mail clients" don't have that issue. "Regular" is a very subjective thing, mutt and pine are considered "regular" where I work.
    "Right, but I'm saying that this is an issue for the file browser, not for Zotero. The vast majority of people have no need for file paths, so I don't see this as something that should be added to Zotero."
    You are assuming that every operation can be done with drag and drop, which is not always the case. Requiring a file browser to be present and depending on its capabilities when a very simple menu option allows for a wider array of operations, is in my opinion an unnecessary thing.

    But if you deem the simple feature is not useful, that is OK. I was able to code it in my local copy of Zotero and it is working, so I am happy now.

    Cheers,
    Rodrigo
  • Drag&Drop from Zotero to a shell (Mac) copies the following:
    1. "name_of_pdf_without_path.pdf"
    which is not useful.
    Show File, drag from Finder to Terminal copies the full path—this is why I was asking where you were using the path.

    I don't think we ever coded it to copy the filename in Zotero, though, so that may be the automatic content from the tree view for text/plain, which we could override with the full path if people deemed that more useful. (I know your vote.)
    I was able to code it in my local copy of Zotero and it is working, so I am happy now.
    Great.
  • I agree that emailing files is less than fluid, and have long wanted to be able to copy attachment paths directly. At present, sending an attached PDF via Mail.app on the Mac requires two steps: 1) first showing the file, and 2) then dragging it onto an email. Direct dragging from Zotero only works for finder windows and the desktop. Gmail's web interface requires three steps. 1) First showing the file, 2) then get info, then 3) pasting path into the file upload window.

    Sending multiple files essentially requires dragging them onto the desktop and then onto an email.

    These workflows all work fine, but could be much more elegant. Hopefully, the day is coming where all of this emailing back and forth will be moot anyway through the use of Zotero Groups.
  • The inability to drag directly to apps other than Finder is likely a limitation of Firefox, though there's a slim possibility that it'll work with new file dragging support available in Firefox 3.6 (which isn't yet utilized by Zotero).
  • I've noticed (with a great deal of glee) that Gmail now allows drag and drop file attachments in FF 3.6. I've tried to drag a Zotero attachment (PDF) onto a Gmail message. Firefox recognizes that I am trying to to attach something, but cannot seem to complete the operation. It would be nice if this were possible with Zotero, though I understand that it may not be trivial.
  • I found this thread and would like to hear if there is any progress on it?
    I have also noticed as Jimdelaney above that you can try to drag a pdf from zotero into gmail and gmail recognizes it, but it doesn't work. That would be amazing if you can get it to work!
  • Hello,

    I also would like to know where this discussion has gone so far. As the user above, I think it would be amazing to be able just to drag and drop a pdf file into gmail or at least to have the option "Copy file location" when I do the right click on the pdf file. Any of these options would save much time when I have to attach multiple files.

    Please, let me know if there are any progress in this direction.

    Thanks.
  • Well this does work, at least on Windows 7 using Zotero 2.1rc1
    Will try it on linux, later.
    Regards, Jon
  • Hi Jon!

    Thanks for your replay.
    I've just tried this at Windows 7 and it does work perfectly even using Zotero 2.0, but on Ubuntu 10.10 it doesn't work with any version of Zotero.
    Do you know if there is anything I can do to get it working?

    Regards,
    Climerio
  • No, this is a long standing Firefox bug - I think the devs have mentioned that it might / should be fixable in Firefox 4, but don't really know the status of it (search for drag and drop and broken; it's been broken in 'nix for a while; but as I said, it's a firefox problem, not strictly a Zotero one)
Sign In or Register to comment.