is it possible to read locally uploaded files and display file content in front screen

636 views
Skip to first unread message

bestfri...@gmail.com

unread,
Jul 19, 2013, 5:53:11 PM7/19/13
to suppor...@runmyprocess.com
is it possible to read locally uploaded files and display file content in front screen in RMP.

Could you please help to resolve this issue?


thanks alot in advance

Gareth Thiveux

unread,
Jul 20, 2013, 9:43:44 AM7/20/13
to suppor...@runmyprocess.com
Hi,

What do you mean by "locally uploaded files" ? Are you talking about files uploaded through the uplod file widget ? You would like a kind of preview of the files you've just uploaded through this widget ?
If so, below or next to your file upload widget, you should add an hidden HTML widget and set its id as id_files_preview for example.
Then create an hidden Javascript widget (that you can put wherever you want in your webform, at the bottom of it for example) that listens to the variable of your file upload widget (let's call this variable file_upload_var).
Finally put the following code into your JS widget :

var preview_html_files ="";
for(f=0;f<JSON.parse(RMPApplication.get("
file_upload_var")).length;f++){
     var preview_html_
files = preview_html_files + "<img src="+JSON.parse(RMPApplication.get("file_upload_var"))[f].url+" alt='File preview' title='File preview' width='400px' onClick='window.open(\""+JSON.parse(RMPApplication.get("file_upload_var"))[f].url+"\",\"_blank\");'><br>"
}
           
id_files_preview.setHtml(preview_html_files);
id_files_preview.setVisible(true);


Hope that's what you wanted.


Regards,

Pre-Sales Consultant / Consultant Avant-Vente
 Fujitsu RunMyProcess
22 rue Chauchat, 75009 Paris - France (GMT+1)

     


Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.


is it possible to read locally uploaded files and display file content in front screen in RMP.

Could you please help to resolve this issue?


thanks alot in advance

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



bestfri...@gmail.com

unread,
Jul 20, 2013, 3:20:24 PM7/20/13
to suppor...@runmyprocess.com
On Saturday, July 20, 2013 9:43:44 AM UTC-4, Gareth Thiveux wrote:
> Hi,
>
> What do you mean by "locally uploaded files" ? Are you talking about files uploaded through the uplod file widget ? You would like a kind of preview of the files you've just uploaded through this widget ?
>
> If so, below or next to your file upload widget, you should add an hidden HTML widget and set its id as id_files_preview for example.
> Then create an hidden Javascript widget (that you can put wherever you want in your webform, at the bottom of it for example) that listens to the variable of your file upload widget (let's call this variable file_upload_var).
>
>
> Finally put the following code into your JS widget :
>
> var preview_html_files ="";
> for(f=0;f<JSON.parse(RMPApplication.get("file_upload_var")).length;f++){
>      var preview_html_files = preview_html_files + "<img src="+JSON.parse(RMPApplication.get("file_upload_var"))[f].url+" alt='File preview' title='File preview' width='400px' onClick='window.open(\""+JSON.parse(RMPApplication.get("file_upload_var"))[f].url+"\",\"_blank\");'><br>"
>
> }
>            
> id_files_preview.setHtml(preview_html_files);
> id_files_preview.setVisible(true);
>
>
>
> Hope that's what you wanted.
>
>
>
>
> Regards,
>
>
>
>
>
> Gareth THIVEUX
>
>
> Pre-Sales Consultant / Consultant Avant-Vente
>
>  Fujitsu RunMyProcess
>
> 22 rue Chauchat, 75009 Paris - France (GMT+1)
>
> website : Fujitsu RunMyProcess
>
>
>
>
>      
>
>
>
>
>
>
>
>
>
>
>
> Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace
>
>
>
>
>
>
> Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
>
> Be environmentally friendly: do not print this email unless it is entirely necessary.
>
>
>
>
>
> 2013/7/19 <bestfri...@gmail.com>
>
> is it possible to read locally uploaded files and display file content in front screen in RMP.
>
>
>
> Could you please help to resolve this issue?
>
>
>
>
>
> thanks alot in advance
>
>
>
> --
>
> Fujitsu - RunMyProcess
>
> ---
>
> You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
>
> To post to this group, send email to suppor...@runmyprocess.com.
>
> Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
>
> For more options, visit https://groups.google.com/a/runmyprocess.com/groups/opt_out.

I tried the same steps but it is not working .

Please find the screenshots for reference.

COuld you please advice did i miss anything?

Thanks alot in advance
Design.PNG
file upload widget.PNG
htmlwidget.PNG
JS widget.PNG
output.PNG

bestfri...@gmail.com

unread,
Jul 20, 2013, 3:21:23 PM7/20/13
to suppor...@runmyprocess.com, bestfri...@gmail.com
I want to display the data in file to be displayed on screen below upload widget

Gareth Thiveux

unread,
Jul 21, 2013, 8:14:21 AM7/21/13
to suppor...@runmyprocess.com, bestfri...@gmail.com
Hi,

I've noticed based on the screenshots you've sent that you haven't filled in the "Listen to variables" field on your Javascript widget with file_upload_var, in order to listen to any modification of this variable.


Regards,

Pre-Sales Consultant / Consultant Avant-Vente
 Fujitsu RunMyProcess
22 rue Chauchat, 75009 Paris - France (GMT+1)

     


Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.

bestfri...@gmail.com

unread,
Jul 21, 2013, 12:19:33 PM7/21/13
to suppor...@runmyprocess.com, bestfri...@gmail.com
On Sunday, July 21, 2013 8:14:21 AM UTC-4, Gareth Thiveux wrote:
> Hi,
>
> I've noticed based on the screenshots you've sent that you haven't filled in the "Listen to variables" field on your Javascript widget with file_upload_var, in order to listen to any modification of this variable.
>
>
>
> Regards,
>
>
>
>
>
> Gareth THIVEUX
>
>
> Pre-Sales Consultant / Consultant Avant-Vente
>
I tried adding the listen variable in the JS widget but it is failing to display the file content and it is displaying blank .

Is there any supported file formats that display as preview ?

Please find the attachment for the output
preview.PNG

Gareth Thiveux

unread,
Jul 22, 2013, 4:26:46 AM7/22/13
to suppor...@runmyprocess.com, Nagasai aytha
Hi,

Sorry for late reply.
The code I've given you only works for images preview. If you want to display any other content than images, you shall use iframe HTML tags instead of img ones.
Here's the code you should use in your javascript instead :

var preview_html_files = "";
for(f=0;f<JSON.parse(RMPApplication.get("file_upload_var")).length;f++){
     var preview_html_files = preview_html_files + "<iframe src='"+JSON.parse(RMPApplication.get("file_upload_var"))[f].url+"' width='100%' height='400px'></iframe><br>"
}
            
id_files_preview.setHtml(preview_html_files);
id_files_preview.setVisible(true);


Regards,

Pre-Sales Consultant / Consultant Avant-Vente
 Fujitsu RunMyProcess
22 rue Chauchat, 75009 Paris - France (GMT+1)

     


Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.

bestfri...@gmail.com

unread,
Jul 22, 2013, 4:44:22 PM7/22/13
to suppor...@runmyprocess.com, Nagasai aytha
On Monday, July 22, 2013 4:26:46 AM UTC-4, Gareth Thiveux wrote:
> Hi,
>
>
> Sorry for late reply.
> The code I've given you only works for images preview. If you want to display any other content than images, you shall use iframe HTML tags instead of img ones.
>
> Here's the code you should use in your javascript instead :
>
>
>
> var preview_html_files = "";
> for(f=0;f<JSON.parse(RMPApplication.get("file_upload_var")).length;f++){
>
>      var preview_html_files = preview_html_files + "<iframe src='"+JSON.parse(RMPApplication.get("file_upload_var"))[f].url+"' width='100%' height='400px'></iframe><br>"
>
> }
>             
> id_files_preview.setHtml(preview_html_files);
> id_files_preview.setVisible(true);
>
>
>
>
> Regards,
>
>
>
>
>
> Gareth THIVEUX
>
>
> Pre-Sales Consultant / Consultant Avant-Vente
>
Hi

I used iframe , but it is started downloading the file instead of displaying the file content on the screen.

File format which i am trying to display content is excel.

Could you please advice wht could be the issue

Gareth Thiveux

unread,
Jul 23, 2013, 5:20:35 AM7/23/13
to suppor...@runmyprocess.com, Nagasai aytha
Hi,

No it's not possible, Excel or Word files cannot be displayed within an iframe, unless you have a plugin in your browser that allows you to display them instead of trying to download them (No problem for displaying images, PDF or txt files for example).


Regards,

Pre-Sales Consultant / Consultant Avant-Vente
 Fujitsu RunMyProcess
22 rue Chauchat, 75009 Paris - France (GMT+1)

     


Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.
Reply all
Reply to author
Forward
0 new messages