Jared Ning

Code Ningja

Mac tip: Safari file upload shortcut

2010-09-02

Typically, when you upload files to the Internet from safari, you click the Choose File button, find the file, select it, then click the Choose button. I find it a little tedious to dig through lots of folders and find the file among a large list of files. Here’s a few quicker ways to do it including one that doesn’t even require a Choose File dialog.

Drag and drop file/folder into dialog

Click the Choose File button to open the dialog. If you happen to have the file showing in a Finder window or your desktop, you can drag the file right onto the dialog. When you drag the file onto the dialog, you’ll see a green plus sign on your mouse pointer. When you drop the file, the dialog will take you straight to wherever that file is. It’s even highlighted for you. This works for folders too. And it works for all OSX file dialogs too, like Save as dialogs, not just in safari.

Drag and drop titlebar icon into dialog

Another quick way is by dragging and dropping the titlebar icon (at the very top and center of a window). Click the Choose File button to open the dialog. If you have the file open in, say, Pages or Preview, you can drag the icon in the window’s titlebar and drop that instead. (Sometimes it helps to click and hold the icon for half a second before dragging. Also make sure the file is saved. You won’t be able to drag it otherwise.)

Drag and drop onto Choose File button (no dialog needed)

Here’s the fastest way for choosing files to upload in safari. Even before you click the Choose File button, just drag and drop the file or titlebar icon right onto the Choose File button. You’ll see the mouse pointer with a plus sign just like with the dialog. Drop the file, et voilà. The file name appears as if you selected one from the dialog. Just make sure you drop on top of the button. Otherwise, Safari may try to OPEN your file in the browser window itself.