|
@@ -5,7 +5,7 @@ require 'json'
|
|
|
# create a room
|
|
|
|
|
|
post '/room' do
|
|
|
- id = SecureRandom.hex(4)
|
|
|
+ id = SecureRandom.hex(6)
|
|
|
Dir.mkdir(id)
|
|
|
content_type 'text/json'
|
|
|
{id: id}.to_json
|
|
@@ -49,4 +49,5 @@ end
|
|
|
# remove a file
|
|
|
|
|
|
delete '/room/:id/:filename' do |id, filename|
|
|
|
+ FileUtils.rm("./"+id+"/"+filename)
|
|
|
end
|