genexussmart-devicegenexus-sd

Upload image or file from smart device in GeneXus


How to upload an image or PDF files from smart devices to a specific folder on the server?


Solution

  • A lil' too late for an answer but I was recently facing this one problem and solved by passing the image forward to the procedure and receiving as a blob data type.

    Next I did the following:

    parm(in:&blob)
    &File.Source = &blob.ToString()
    &File.Copy('path/to/file.jpeg')
    &HTTPClient.AddFile('path/to/file.jpeg')
    

    Hope it still serves you