cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Upload and display image from local without using File Upload widget

Quannd
8-Gravel

Upload and display image from local without using File Upload widget

Hi all,

Like the subject, I'd like to upload and display an image into Mashup without using File Upload widget. Is there any way to perform it?

Any help is appreciated.

Thanks.

ACCEPTED SOLUTION

Accepted Solutions

Hello,

 

Something like that is probably nearly the best result you can achieve easily without developing your own JavaScript extension.

2019-07-25 10_20_14-ImageUploaderMashup.png2019-07-25 10_20_41-ImageUploaderMashup.png

See mashup code attached. I exported it from 7.4, but it should load in 8.x. Please let me know if it doesn't work.

 

/ Constantine

View solution in original post

4 REPLIES 4

Hello,

 

Do you want a user to upload it through his web browser, or some external program through some scripting? If latter, then the answer depends on a kind of external program that you have. Just a couple of examples:

 

  1. A .NET application on a remote Windows host
    1. Can use EDGE SDK for Java to upload the file
    2. Can execute a REST call using HttpClient class
    3. Can map a ThingWorx FileRepository to a local directory via Samba (Windows file sharing protocol)
    4. ...
  2. A Bash script on the same network
    1. Can upload files via REST calls using curl
    2. Can map a FileRepository directory via NFS
    3. Can upload files via ftp, rsync, scp, ...
    4. ...
  3. ...

If you want a user to upload a file through his web browser, then what's wrong with the standard FileUpload widget?

 

Basically, you need to explain in more detail what you are trying to achieve.

 

/ Constantine

Hello Constantine,

Actually, I would like to create a "custom widget" like "SaveImage" in FileRepository. For more details, please check the attachment.

Thank you.

Hello,

 

Something like that is probably nearly the best result you can achieve easily without developing your own JavaScript extension.

2019-07-25 10_20_14-ImageUploaderMashup.png2019-07-25 10_20_41-ImageUploaderMashup.png

See mashup code attached. I exported it from 7.4, but it should load in 8.x. Please let me know if it doesn't work.

 

/ Constantine

Thank you very much, Constantine

It works.

Announcements


Top Tags