Alternative method of uploading python code to CPX4

Hi All,

Is there another way of uploading python code to CPX4 other then using WebUI or CLI?

Can I use something like a vim ftp plugin for modifying remote files? e.g., [1]

Thanks,
Chris

[1] http://www.marksanborn.net/software/modify-remote-files-with-vims-built-in-ftp-plugin/

Hello,

One option would be to bypass the WebUI and post the files directly. This could be done either through a simple PC side application using a multipart/form-data HTTP post, or from the command line similar to this script on the wiki:

http://www.digi.com/wiki/developer/index.php/Commandline_File_Upload

http://www.digi.com/wiki/developer/index.php/RCI_do_command

can do an rci do_command to put a new file in /WEB/python
i.e.

    BASE64 ENCODED DATA

Thanks for that. I included in the code the authentication.

The request would be:
curl -u $USER --anyauth -v $HOST:$PORT/Forms/python_files_1 -F “currentdirectory=WEB/python” -F file=@$FILE

This will obviously ask for a password. However, if you are running over local ethernet network you can include the password in a script.

Thanks
Chris

We also have some info on basic HTTP authentication if anyone needs that:

http://www.digi.com/wiki/developer/index.php/HTTP_Basic_Authentication