forked from vieter-v/vieter
Wrote a proper env file system
This commit is contained in:
parent
d6e71e9a1c
commit
1d434db166
8 changed files with 128 additions and 56 deletions
|
|
@ -58,10 +58,10 @@ fn (mut app App) put_package() web.Result {
|
|||
|
||||
if length := app.req.header.get(.content_length) {
|
||||
// Generate a random filename for the temp file
|
||||
pkg_path = os.join_path_single(app.dl_dir, rand.uuid_v4())
|
||||
pkg_path = os.join_path_single(app.conf.download_dir, rand.uuid_v4())
|
||||
|
||||
for os.exists(pkg_path) {
|
||||
pkg_path = os.join_path_single(app.dl_dir, rand.uuid_v4())
|
||||
pkg_path = os.join_path_single(app.conf.download_dir, rand.uuid_v4())
|
||||
}
|
||||
|
||||
app.ldebug("Uploading $length bytes (${pretty_bytes(length.int())}) to '$pkg_path'.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue