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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Translate the entire conversation x

File Upload Widget - Data can be seen when uploaded.

Abhishek_Tirkey
13-Aquamarine

File Upload Widget - Data can be seen when uploaded.

I want to display the data when I upload it through File Upload Widget.

For Example - If I upload a csv file using File Upload Widget, then the uploaded csv file content data should be visible to us.

Abhishek Tirkey
ACCEPTED SOLUTION

Accepted Solutions

after user uploaded the file you would need to use service LoadText of the FileRepository, to get the content of the uploaded file. And display the content how you like in the mashup. Looks like currently you show the filepath in your textarea on the right. There you would need to adapt the binding to show result of LoadText service.

 

For csv files a CSV Parser exists which you maybe could use to display the csv in a grid. I'm not 100% clear if this works for any .csv (with unknown columns) as I only used it with known columns, as csvparser needs a DataShape to parse the csv into.

 

View solution in original post

4 REPLIES 4

Hi @Abhishek_Tirkey ,

Let's split this requirement in 2 parts:

  1. You want to see data from a file - for that you can use the TextArea widget for human readable formats like CSV.
  2. You'd need to upload it - for that you can use the FileUploader widget. That will provide a property called FullPaths, that you can use in order to supply the input to the service that loads data in the TextArea widget, after you selected a file for upload.

Abhishek_Tirkey_0-1736769327740.png 

 

I have taken a File Upload Widget and uploaded a currency.csv file.

But could not able to see the content present inside the csv file.

I am not clear with the bindings and services required for this.

 

 

Abhishek Tirkey

after user uploaded the file you would need to use service LoadText of the FileRepository, to get the content of the uploaded file. And display the content how you like in the mashup. Looks like currently you show the filepath in your textarea on the right. There you would need to adapt the binding to show result of LoadText service.

 

For csv files a CSV Parser exists which you maybe could use to display the csv in a grid. I'm not 100% clear if this works for any .csv (with unknown columns) as I only used it with known columns, as csvparser needs a DataShape to parse the csv into.

 

Announcements


Top Tags