telegram-bot-bash icon indicating copy to clipboard operation
telegram-bot-bash copied to clipboard

send_file doesn't work for me

Open HarrisMt opened this issue 3 years ago • 4 comments

send_file "-781874795" "/var/www/tmp/download.png" "Lool" bin/send_file.sh "-781874795" "/var/www/tmp/download.png" "Lool"

and doesn't get anything, but I send_message function is work for me to send messages.

HarrisMt avatar Jan 13 '22 07:01 HarrisMt

by default file to send needs to be in "data-bot-bash" dir and absolute pathnames are not allowed

gnadelwartz avatar Jan 13 '22 11:01 gnadelwartz

fine

HarrisMt avatar Jan 13 '22 11:01 HarrisMt

From send_file function reference: https://github.com/topkecleon/telegram-bot-bash/blob/master/doc/6_reference.md

For security reasons the following restrictions apply to local files:

absolute path name must match the shell regex FILE_REGEX
relative path name is threated as relative to UPLOADDIR (default: data-bot-bash/upload)
path must not start with ./ and not contain ../

gnadelwartz avatar Jan 13 '22 11:01 gnadelwartz

but you raise a valid point, I will add error resposes to send _file in the next release

gnadelwartz avatar Jan 13 '22 12:01 gnadelwartz