omnifiles 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/lib/omnifiles/protectedapp.rb +3 -3
- data/lib/omnifiles/version.rb +1 -1
- data/lib/omnifiles/views/index.haml +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aecd7d2b5661651247d9e3864e8bf14fc5907c02
|
4
|
+
data.tar.gz: 7b03735324b2271ed5973eaa638182dd466facf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfb7dce2edc0fa1515d4d6afdadf4de28ca65590435b3ce55b041c21ad99b59d8a30a322ade7a6c3a56d592b0a4edf9d651d0980117dd478c632ca324d52f643
|
7
|
+
data.tar.gz: 98509d750f0fb451daf12e686555a4ca521f3a924bd948892514d9ca07addf4592a1a2210610dd7538987814527101162638382a9a1b6f429af53f3e62552bae
|
data/README.md
CHANGED
@@ -91,10 +91,14 @@ Header `X-Original-Filename` contains escaped original filename.
|
|
91
91
|
|
92
92
|
3. Viewing statistics.
|
93
93
|
OmniFiles provides file access statistics using authenticated requests.
|
94
|
-
Visit an url
|
94
|
+
Visit an url using web browser or curl.
|
95
95
|
|
96
96
|
http://localhost:3000/stat/e63A12
|
97
|
-
|
97
|
+
|
98
|
+
3. Control panel.
|
99
|
+
Viewing and deleting stored files can be performed at control panel:
|
100
|
+
|
101
|
+
http://localhost:3000/stat
|
98
102
|
|
99
103
|
## License information
|
100
104
|
|
@@ -73,7 +73,7 @@ module OmniFiles
|
|
73
73
|
|
74
74
|
# POST to delete file
|
75
75
|
# cannot remap methods
|
76
|
-
post '/
|
76
|
+
post '/stat/:name/delete' do |name|
|
77
77
|
logger.info "Route POST to delete file #{name}"
|
78
78
|
|
79
79
|
target_path = File.join(Settings.storage_dir, name)
|
@@ -89,11 +89,11 @@ module OmniFiles
|
|
89
89
|
flash[:error] = "Cannot delete file #{name} from mongo"
|
90
90
|
end
|
91
91
|
|
92
|
-
redirect to('/')
|
92
|
+
redirect to('/stat')
|
93
93
|
end
|
94
94
|
|
95
95
|
# GET index
|
96
|
-
get '/' do
|
96
|
+
get '/stat' do
|
97
97
|
logger.info "Route GET index"
|
98
98
|
|
99
99
|
@hdata = []
|
data/lib/omnifiles/version.rb
CHANGED
@@ -116,7 +116,7 @@
|
|
116
116
|
%td=doc[:created_time]
|
117
117
|
%td=doc[:mime]
|
118
118
|
%td
|
119
|
-
%form{ :action => "/
|
119
|
+
%form{ :action => "/stat/#{doc[:shortened]}/delete", :method => 'post' }
|
120
120
|
%button.delete{ :type => 'submit'}Delete
|
121
121
|
|
122
122
|
%p
|