projects
/
coquelicot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
912edab
)
store 'Expire-at' as integer instead of string
author
Lunar
<lunar@anargeek.net>
Tue, 3 Aug 2010 10:52:33 +0000
(12:52 +0200)
committer
Lunar
<lunar@anargeek.net>
Tue, 3 Aug 2010 10:52:33 +0000
(12:52 +0200)
coquelicot.rb
patch
|
blob
|
history
diff --git
a/coquelicot.rb
b/coquelicot.rb
index
a3b425c
..
d71bd7a
100644
(file)
--- a/
coquelicot.rb
+++ b/
coquelicot.rb
@@
-101,7
+101,7
@@
private
if @meta["Coquelicot"].nil? or @meta["Coquelicot"] != COQUELICOT_VERSION then
raise "unknown file"
end
if @meta["Coquelicot"].nil? or @meta["Coquelicot"] != COQUELICOT_VERSION then
raise "unknown file"
end
- @expire_at = Time.at(@meta['Expire-at']
.to_i
)
+ @expire_at = Time.at(@meta['Expire-at'])
end
def init_decrypt_cipher(pass)
end
def init_decrypt_cipher(pass)
@@
-357,7
+357,7
@@
post '/upload' do
src = params[:file][:tempfile]
link = depot.add_file(
src, pass,
src = params[:file][:tempfile]
link = depot.add_file(
src, pass,
- { "Expire-at" => expire_at.
strftime('%s')
,
+ { "Expire-at" => expire_at.
to_i
,
"Filename" => params[:file][:filename],
"Length" => src.stat.size,
"Content-Type" => params[:file][:type]
"Filename" => params[:file][:filename],
"Length" => src.stat.size,
"Content-Type" => params[:file][:type]