webhook icon indicating copy to clipboard operation
webhook copied to clipboard

arguments with special characters.

Open foxsam21 opened this issue 2 years ago • 1 comments

I would like to call a command that has the & character and also I need an argument with " in it. It seems that anything I tried is not working. In bash I can just call the whole thing in " and it works. I am trying to download a snapshot from an IP camera. Here is what I have (I use my actual user and camera IP in the real file):

- id: snapshot
  execute-command: "wget"
  command-working-directory: ""
  pass-arguments-to-command:
    - source: string
      name: "http://CAM/cgi-bin/api.cgi?cmd=Snap&channel=0&user=my_user"
    - source: string
      name: -O "/home/my_user/Desktop/snapshot $(date).jpg"

foxsam21 avatar Feb 05 '23 16:02 foxsam21

try using /home/my_user/Desktop/snapshot%20$(date).jpg

check this website for more special character encoding: HTML URL Encoding Reference

adelorenzo-portainer avatar Mar 15 '23 04:03 adelorenzo-portainer