-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
27 lines (21 loc) · 1 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Troois: Like Amazon S3 on Google App Engine
Goal: Install Troois to your Google App Engine account, and you can send/retrieve files, a bit like on Amazon S3.
Who would use Troois instead of Amazon S3, which is so cheap?
- Open source project who have zero money.
- People who want zero running costs.
Limitations:
- No encryption
- No authentication
Ruby code to send a file:
troois_url = 'http://your-troois-app.appspot.com/' # Configure yours here
require 'open-uri'
require 'rest_client'
form = open(troois_url) {|f| f.read }
post_url = form.gsub(/.*action=\"/, '').gsub(/\" method.*/, '')
puts 'Dynamic URL for Google App Engine blobstore upload:' + post_url
key = RestClient.post post_url, :file => File.new('your-file.odt', 'rb')
puts 'File now available at: ' + troois_url + 'serve/' + key
Then anyone with the URL can download the file.
The URL contains a very long randomly-generated unique key.
TODO:
The Ruby code above could proably be improved to remove the form-parsing step.