Help to config ZM to upload videos to Dropbox

Forum for questions and support relating to the 1.24.x releases only.
Locked
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Help to config ZM to upload videos to Dropbox

Post by PacoLM »

Hi,

I had ZM configured to send an email of every event using a filter. Everything worked fine until Gmail decided to limit the mail sent ratio, so my system was detected as spammer and no mail was accepted!. Now, I'm looking into uploading the videos to a dropbox account. I have found this link http://jaka.kubje.org/projects/dropbox-uploader/, where there is a php function to allow upload the file. My question is: how could I call this function from python?. I would like to call the upload function from the zmfilter.pl, do you know if its possible?.

Regards,

PacoLM

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
kross
Posts: 12
Joined: Wed Jun 01, 2011 8:12 pm

Re: Help to config ZM to upload videos to Dropbox

Post by kross »

Can't you just run a script that copies the events to your dropbox folder, and let the dropbox daemon handle uploading it?
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Help to config ZM to upload videos to Dropbox

Post by PacoLM »

Hi,

Well, I do not know if it's that easy. My ZM system runs in a guruplug (debian arm based), so I believe that there is no distribution made for this architecture.

PacoLM

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
kross
Posts: 12
Joined: Wed Jun 01, 2011 8:12 pm

Re: Help to config ZM to upload videos to Dropbox

Post by kross »

Well, to answer your original question, how to call php from python, php scripts can be run from the command line, like python scripts (you need the php5-cli package installed). They don't need to be hosted in a web server. So write a small php script that takes as a command line argument the filename you want to upload. Then from your python script, execute the php script (using the os.system() function call), passing the filename that you want uploaded.
Locked