Skip to content

Instantly share code, notes, and snippets.

@boucher
Created December 31, 2009 18:51
Show Gist options
  • Select an option

  • Save boucher/266850 to your computer and use it in GitHub Desktop.

Select an option

Save boucher/266850 to your computer and use it in GitHub Desktop.
var attachment = database.find(hash)._attachments[filename],
contentType = attachment.content_type,
data = HTTP.read(databaseURL+encodeURIComponent(databaseName)+"/"+hash+"/"+filename);
return function(){
return {
status : 200,
headers : {"Content-Type":contentType},
body : data.toByteArray()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment