upload a public file from web interface

549 views
Skip to first unread message

sergio...@gigas.com

unread,
Sep 11, 2017, 8:07:33 AM9/11/17
to Fujitsu RunMyProcess Developer Community
Hello,

I need to upload a file from the web interface and that image is directly published, so that the image url can be accessed without authentication, is this possible?

i can manually change from public to private state from file manager in project

but the idea is that the change is done automatically, after uploading the file from the web interface

A greeting

Gunjan Rajgure

unread,
Sep 11, 2017, 4:44:41 PM9/11/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
Hello Sergio,

There is no direct way to set public access of upload widget, but alternately you can do one thing. 
If you are uploading image on Launch Screen, then add following widgets on next screen to show that image directly.

1. Add text widget on Web Interface. e.g.named as txt_url.
2. Get URL of uploaded file and set it to that text widget. In Manual activity of process add one input parameter of same name as txt_url and assign value to it as ${upload_widget[0].url}.
3. Add image widget on Web Interface to show uploaded image.
4. Write this following code inside JS widget to set url into image widget.
    id_image_widget.setUrl(RMPApplication.get("txt_url")); 

In this way you can direct show uploaded image on your next screen. I have attache some screen shots which will helps you to understand scenario.

Note: Your upload widget in on Launch Screen and these all remaining widgets are on next screen to show uploaded image. You can access next screen using Manual activity of process.

Hope this will helps you, If still you are not getting anything, Please don't hesitate to contact us.


Thanks & Regards,
Gunjan Rajgure
Fujitsu - RunMyProcess Support.




--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/a05a01ae-ccaf-4385-828f-29e65a2356f4%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

upload.JPG

Gunjan Rajgure

unread,
Sep 11, 2017, 4:50:36 PM9/11/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
Hello Sergio,

Please find attached screen shots here.


Thanks & Regards,
Gunjan Rajgure
Fujitsu - RunMyProcess Support
txt_url.JPG
upload.JPG
upload_widget.JPG

sergio...@gigas.com

unread,
Sep 12, 2017, 2:47:13 AM9/12/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
Hello gunjan

What I mean is that the user uploads a file from the upload file widget on the web interface and I need that image to be made public so I can access it from my server with nodejs.

I attached an image of what I want to change, how would I do it programming?

I have seen a link to use a method to be able to do it, but I do not know exactly how to use it, could you put an example with some image please ?, so I can understand this method should be used in the process.

http://docs.runmyprocess.com/Developer_Guide/Process/Freemarker_Examples/File_Visibility

a greeting

Selecció.png

Prachi Chandak

unread,
Sep 12, 2017, 3:54:48 AM9/12/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
Hello Sergio,

Yes you can easily change the accessibility of the file uploaded from file upload widget by using freemarker function given in http://docs.runmyprocess.com/Developer_Guide/Process/Freemarker_Examples/File_Visibility

Use it in following format. 
E.g : ${save_file_desc("dae96040-978d-11e7-a64a-0639651b3341",{"visibility":"PUBLIC"})}

You need to pass file id into inverted comma(" "). And if you are passing variable name then just put name to the id variable name like ${save_file_desc(file_id_variable_name,{"visibility":"PUBLIC"})}

Please let us know if you still face any issue. Feel free to contact us for any further query.


Thanks & Regards,
Prachi Chandak
Fujitsu RunMyProcess Support

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

sergio...@gigas.com

unread,
Sep 13, 2017, 2:27:42 AM9/13/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
Hi pchandak

I have to put myself in another matter, when I finish, I finish working on this and I inform you if it works


a greeting

sergio...@gigas.com

unread,
Sep 15, 2017, 2:46:59 AM9/15/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
Hello

I have finally been very helpful to you and I have been able to complete the task, thank you very much

a greeting

Reply all
Reply to author
Forward
0 new messages