Added $LINK_STORE so the user can choose where to store the upload
links. Closes #9
This commit is contained in:
parent
95ab4caca1
commit
97e5c795e7
2 changed files with 6 additions and 4 deletions
4
TODO.MD
4
TODO.MD
|
@ -1,2 +1,2 @@
|
|||
* set $MAX_SIZE variable in upload.cgi
|
||||
* echo links in .cache/lainsafelinks in lainsafecli
|
||||
[x] set $MAX_SIZE variable in upload.cgi
|
||||
[x] echo links in .cache/lainsafelinks in lainsafecli
|
||||
|
|
|
@ -29,11 +29,13 @@ my $DEFAULT_SERVER;
|
|||
my $file;
|
||||
my $DISPLAY_ASCII;
|
||||
my $STORE_LINKS;
|
||||
my $LINKS_FILE;
|
||||
# Default options, if no specified.
|
||||
$DEFAULT_SERVER = "https://lainsafe.delegao.moe";
|
||||
$DISPLAY_ASCII = 1; # 0 if you don't want the ascii
|
||||
$STORE_LINKS = 1; # 0 if you don't want to keep track of your upload
|
||||
|
||||
$LINKS_FILE = "$ENV{HOME}/.lainsafelinks";
|
||||
|
||||
my $ASCII_ART = <<'EOF';
|
||||
_..-- ----- --.._
|
||||
,-'' `-.
|
||||
|
@ -116,7 +118,7 @@ print $DEFAULT_SERVER . "/" . $req->{_content} . "\n";
|
|||
|
||||
if($STORE_LINKS)
|
||||
{
|
||||
open FILE,'>>',"$ENV{HOME}/.cache/lainsafelinks" or die $!;
|
||||
open FILE,'>>',$LINKS_FILE or die $!;
|
||||
print FILE $DEFAULT_SERVER . "/" . $req->{_content} . " $file" ."\n";
|
||||
close FILE;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue