omnifiles 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cdc7404e8fb3bf594a9c686e40dec5a1bcff348
4
- data.tar.gz: 7afd2f9c25f9a4c372e99dc82203974a795712ab
3
+ metadata.gz: aecd7d2b5661651247d9e3864e8bf14fc5907c02
4
+ data.tar.gz: 7b03735324b2271ed5973eaa638182dd466facf2
5
5
  SHA512:
6
- metadata.gz: 0ca79679d327f92bfcdba960a2c3cda44222d3daad86aa933f31a7bfc2dd999b7783ff7469a960cc65609295633dc31ad8782dd8632b62119b2c44b5ee051776
7
- data.tar.gz: 3f9b7eed3669d4f685962f6147ac4a8eb9c8060faa2dc70956565d4f8b5d4183c4a3d78d909e1c0f4a3307dd36bee2ead667d04099cbe69dc5c0ff31eb3127c0
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
- using web browser or curl
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 '/delete/:name' do |name|
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 = []
@@ -1,3 +1,3 @@
1
1
  module OmniFiles
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -116,7 +116,7 @@
116
116
  %td=doc[:created_time]
117
117
  %td=doc[:mime]
118
118
  %td
119
- %form{ :action => "/delete/#{doc[:shortened]}", :method => 'post' }
119
+ %form{ :action => "/stat/#{doc[:shortened]}/delete", :method => 'post' }
120
120
  %button.delete{ :type => 'submit'}Delete
121
121
 
122
122
  %p
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnifiles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - theirix