I want to write script for sending images from my server to ftp with Mikrotik /tool fetch and add it to scheduler, for every minute executing. My image keep in "img" variable. How can I send it to ftp without saving this image in file?
:local img [/tool fetch user="user" password="password" url="http://192.168.1.1/image.jpg" mode=http as-value output=user];
/tool fetch address="my.ftp.com" src-path=$img user=ftpuser mode=ftp password=ftppassword dst-path="/ftpimage.jpg" upload=yes
P.S. I don't wan't to save this image in file, because continual every minute writing can break rom memory of my switch in a short time.
If your router has a /flash subdirectory, it means that the / directory is a RAMDisk. So you can safely store there files every minute without damaging disk.
Source: https://help.mikrotik.com/docs/pages/viewpage.action?pageId=2555971
If you don't have a /flash subdirectory, well, use a cheap external USB key as temporary disk and replace it every 6 months.