This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given an S3 URL, this returns a signed S3 url that will force the browser | |
# to download the file rather than opening it in the browser window. The key | |
# is to add response-content-disposition to the query string, which tells S3 | |
# to send the content-disposition header you specify. S3 will respect this | |
# parameter only if the URL is signed. You can override other S3 headers such | |
# as content-type using this same method. See: | |
# | |
# http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html | |
# | |
def s3_download_url(url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
A [native solution][1] exists but it suffers from a major flaw: it right-clicks where the cursor is, not what on the selection. | |
This code addresses that limitation, though it only works on Finder windows and not the Desktop. | |
You can install it as a [Finder Service, and later asign it a keyboard shortcut][2]. | |
[1]: http://stackoverflow.com/questions/9171613/right-click-shortcut-for-mac-lion-os | |
[2]: http://www.macosxautomation.com/services/learn/tut01/index.html | |
*) |