solutus 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/solutus.rb +4 -3
- data/resources/index.html +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 776fe3f61c19491bc00a77ff0bffaec3f1db9215e51a11452f7dd34c6788c166
|
4
|
+
data.tar.gz: f7dd68448cc214ac0fb6c752424907fd01761596e72d2d35e2ef5c97aad4be00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3812df86287819f2905efadecc9e5497e2fbbf9aaae0b275de2d28a700ea1e3b537cf2c1ea368f3949a62457c1dad745f1e611b2145b9b2c67db956fec0a7096
|
7
|
+
data.tar.gz: c4b82b8285b8c7dd8ca43d6c0f7e666d493ca70c5fe93d80ce29672de4773d176e75c924d8b13705b7ec7983cf197863e64abdacfb240ce1a3d41d132c786b38
|
data/lib/solutus.rb
CHANGED
@@ -31,7 +31,7 @@ class Solutus
|
|
31
31
|
PASSWORD_FILE = "password.txt"
|
32
32
|
DAY_ENDINGS = ["th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "st"]
|
33
33
|
|
34
|
-
VERSION = '0.2.
|
34
|
+
VERSION = '0.2.1'
|
35
35
|
|
36
36
|
LOG_FILE = 'log'
|
37
37
|
|
@@ -162,7 +162,7 @@ class Solutus
|
|
162
162
|
if !File.directory?(dir)
|
163
163
|
FileUtils.mkdir_p(dir)
|
164
164
|
end
|
165
|
-
if
|
165
|
+
if File.file?(path)
|
166
166
|
return 'error: file already exists'
|
167
167
|
end
|
168
168
|
f = File.new(path, 'w')
|
@@ -278,7 +278,8 @@ HERE
|
|
278
278
|
File.open(path_to_file, 'wb') do |f|
|
279
279
|
f.write(file.read)
|
280
280
|
end
|
281
|
-
|
281
|
+
write_log("Uploaded #{path_to_file} from #{request.ip}")
|
282
|
+
|
282
283
|
Solutus.command("build")
|
283
284
|
|
284
285
|
link = settings.global_settings['domain'] + "/" + UPLOAD_DIR_SUFF + "/#{dir}/" + filename
|
data/resources/index.html
CHANGED
@@ -41,7 +41,7 @@
|
|
41
41
|
<form method="post" action="/upload" enctype="multipart/form-data">
|
42
42
|
<fieldset>
|
43
43
|
<legend>Upload File and Get Link</legend>
|
44
|
-
<p><input type="file" name="file"></p>
|
44
|
+
<p><input type="file" name="file" required></p>
|
45
45
|
File subdirectory:
|
46
46
|
<input list="fofoo" required name='dir' />
|
47
47
|
<datalist id="fofoo">{{{file_upload_paths}}}</datalist>
|