append .txt if the filename is "-"
This is to allow pastes like `curl -F'file=@-;' https://ls.qorg11.net`
This commit is contained in:
parent
20b30be2f5
commit
3f3d173e5d
1 changed files with 3 additions and 1 deletions
|
@ -74,7 +74,9 @@ if ($filename) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if($filename eq "-") {
|
||||||
|
$filename .= ".txt"; # for pastes
|
||||||
|
}
|
||||||
if ($allowed_extension) {
|
if ($allowed_extension) {
|
||||||
|
|
||||||
open(FILE,">$upload_dir/$dirname/$filename");
|
open(FILE,">$upload_dir/$dirname/$filename");
|
||||||
|
|
Loading…
Add table
Reference in a new issue