jgm-cloudlib 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/cloudlib-web +2 -0
- data/cloudlib.gemspec +1 -1
- metadata +1 -1
data/bin/cloudlib-web
CHANGED
@@ -3,6 +3,7 @@ require 'rubygems'
|
|
3
3
|
require 'digest/sha1'
|
4
4
|
require 'sinatra' # sinatra gem
|
5
5
|
require 'tempfile'
|
6
|
+
require 'fileutils'
|
6
7
|
require 'cloudlib'
|
7
8
|
require 'highline/import' # highline gem
|
8
9
|
|
@@ -51,6 +52,7 @@ post '/upload' do
|
|
51
52
|
tempfilepath = tempfile.path
|
52
53
|
tempfile.close
|
53
54
|
entry = Cloudlib::Entry.from_file(tempfilepath, params[:fileToUpload][:filename])
|
55
|
+
FileUtils.rm tempfilepath
|
54
56
|
set_attributes_from_form(entry)
|
55
57
|
entry.save
|
56
58
|
redirect "/"
|
data/cloudlib.gemspec
CHANGED