2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-07 19:04:20 +00:00

50_SSFile.pm: contrib Version 0.5.0

git-svn-id: https://svn.fhem.de/fhem/trunk@23047 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2020-10-29 21:30:26 +00:00
parent ac2a1737ae
commit 944d3be5e3

View File

@ -115,6 +115,7 @@ BEGIN {
readingFnAttributes readingFnAttributes
ReadingsVal ReadingsVal
RemoveInternalTimer RemoveInternalTimer
ResolveDateWildcards
readingsBeginUpdate readingsBeginUpdate
readingsBulkUpdate readingsBulkUpdate
readingsBulkUpdateIfChanged readingsBulkUpdateIfChanged
@ -204,7 +205,7 @@ my $queueStartFn = "FHEM::SSFile::getApiSites"; #
my $mbf = 1048576; # Divisionsfaktor für Megabytes my $mbf = 1048576; # Divisionsfaktor für Megabytes
my $kbf = 1024; # Divisionsfaktor für Kilobytes my $kbf = 1024; # Divisionsfaktor für Kilobytes
my $bound = "wNWT9spu8GvTg4TJo1iN"; # Boundary for Multipart POST my $bound = "wNWT9spu8GvTg4TJo1iN"; # Boundary for Multipart POST
my $excluplddef = "@"; # vom Upload per default excludierte Objekte (Regex) my $excluplddef = ".*@.*"; # vom Upload per default excludierte Objekte (Regex)
my $uldcache = $attr{global}{modpath}."/FHEM/FhemUtils/Uploads_SSFile_"; # Filename-Fragment für hochgeladene Files (wird mit Devicename ergänzt) my $uldcache = $attr{global}{modpath}."/FHEM/FhemUtils/Uploads_SSFile_"; # Filename-Fragment für hochgeladene Files (wird mit Devicename ergänzt)
################################################################ ################################################################
@ -623,6 +624,8 @@ sub _setUpload {
} }
$remDir =~ s/\/$//x; $remDir =~ s/\/$//x;
my @t = localtime;
$remDir = ResolveDateWildcards ($remDir, @t); # POSIX Wildcards für Verzeichnis auflösen
my $ow = $h->{ow} // "true"; # Überschreiben Steuerbit my $ow = $h->{ow} // "true"; # Überschreiben Steuerbit
my $cdir = $h->{cdir} // "true"; # create Directory Steuerbit my $cdir = $h->{cdir} // "true"; # create Directory Steuerbit
@ -1951,7 +1954,7 @@ sub exploreFiles {
find ( { wanted => sub { my $file = $File::Find::name; find ( { wanted => sub { my $file = $File::Find::name;
my $dir = $File::Find::dir; my $dir = $File::Find::dir;
if("$file" =~ m/$excl/xs) { # File excludiert from Upload if("$file" =~ m/^$excl$/xs) { # File excludiert from Upload
Log3 ($name, 3, qq{$name - Object "$file" is excluded from Upload}); Log3 ($name, 3, qq{$name - Object "$file" is excluded from Upload});
return; return;
} }