Yes, display in a chart as a preview. Part of the data(selected rows) will be then saved as an attribute in a custom object. Custom object will then be persisted to the system. So there is no need of retrieving data from this fileSource later.
···
On Thu, Jun 2, 2016 at 12:29 PM, Knut Staring knutst@gmail.com wrote:
Knut
Sure, but what is it you want to do with this after retrieving? Display it somehow?
Yes, display in a chart as a preview. Part of the data(selected rows) will be then saved as an attribute in a custom object. Custom object will then be persisted to the system. So there is no need of retrieving data from this fileSource later.
Thanks. Just the selected rows from the CSV are going to be stored in the data store. But to do so, first I need to show the content of the CSV to the user (graphically). So I have to read the content of the CSV first.
If I am going to do it in one of my own web app, what I will do is,
Upload the CSV to server temporary.(say tmp.csv) (I need a solution for this step in the DHIS context)
Read back the uploaded CSV(tmp.csv) show it to the user. (draw a chart in my case)
Allow the user to select the required data.
Save only the selected data(rows) to the database. (In DHIS, saving to the data store)
Delete tmp.csv
So what I really need is to do the same thing in step 1 above using the DHIS Web api.
Thanks.
···
On Thu, Jun 2, 2016 at 12:37 PM, Morten Olav Hansen morten@dhis2.org wrote:
Did you have a look at the data store API? [1], you could also use the user setting API to store it (if its small enough) [2]
Yes, display in a chart as a preview. Part of the data(selected rows) will be then saved as an attribute in a custom object. Custom object will then be persisted to the system. So there is no need of retrieving data from this fileSource later.
Thanks. Just the selected rows from the CSV are going to be stored in the data store. But to do so, first I need to show the content of the CSV to the user (graphically). So I have to read the content of the CSV first.
If I am going to do it in one of my own web app, what I will do is,
Upload the CSV to server temporary.(say tmp.csv) (I need a solution for this step in the DHIS context)
Read back the uploaded CSV(tmp.csv) show it to the user. (draw a chart in my case)
Allow the user to select the required data.
Save only the selected data(rows) to the database. (In DHIS, saving to the data store)
Delete tmp.csv
So what I really need is to do the same thing in step 1 above using the DHIS Web api.
Yes, display in a chart as a preview. Part of the data(selected rows) will be then saved as an attribute in a custom object. Custom object will then be persisted to the system. So there is no need of retrieving data from this fileSource later.
Thanks. Just the selected rows from the CSV are going to be stored in the data store. But to do so, first I need to show the content of the CSV to the user (graphically). So I have to read the content of the CSV first.
If I am going to do it in one of my own web app, what I will do is,
Upload the CSV to server temporary.(say tmp.csv) (I need a solution for this step in the DHIS context)
Read back the uploaded CSV(tmp.csv) show it to the user. (draw a chart in my case)
Allow the user to select the required data.
Save only the selected data(rows) to the database. (In DHIS, saving to the data store)
Delete tmp.csv
So what I really need is to do the same thing in step 1 above using the DHIS Web api.
Thanks.
On Thu, Jun 2, 2016 at 12:37 PM, Morten Olav Hansen morten@dhis2.org wrote:
Did you have a look at the data store API? [1], you could also use the user setting API to store it (if its small enough) [2]
Yes, display in a chart as a preview. Part of the data(selected rows) will be then saved as an attribute in a custom object. Custom object will then be persisted to the system. So there is no need of retrieving data from this fileSource later.
Yeah, I think it’s fairly recent… if you don’t have to support every single version of IE… I think it’s safe to use it (it also removes the need to store tmp files on the server)
Thanks. Just the selected rows from the CSV are going to be stored in the data store. But to do so, first I need to show the content of the CSV to the user (graphically). So I have to read the content of the CSV first.
If I am going to do it in one of my own web app, what I will do is,
Upload the CSV to server temporary.(say tmp.csv) (I need a solution for this step in the DHIS context)
Read back the uploaded CSV(tmp.csv) show it to the user. (draw a chart in my case)
Allow the user to select the required data.
Save only the selected data(rows) to the database. (In DHIS, saving to the data store)
Delete tmp.csv
So what I really need is to do the same thing in step 1 above using the DHIS Web api.
Thanks.
On Thu, Jun 2, 2016 at 12:37 PM, Morten Olav Hansen morten@dhis2.org wrote:
Did you have a look at the data store API? [1], you could also use the user setting API to store it (if its small enough) [2]
Yes, display in a chart as a preview. Part of the data(selected rows) will be then saved as an attribute in a custom object. Custom object will then be persisted to the system. So there is no need of retrieving data from this fileSource later.
To answer the original question: no, currently fileResource is only used as a backend for storing file content with DataValues. Extending it to more generic file store use cases is on the horizon, but it’s yet to be specified on the roadmap, unfortunately.
···
On Thu, Jun 2, 2016 at 10:09 AM, Morten Olav Hansen morten@dhis2.org wrote:
Yeah, I think it’s fairly recent… if you don’t have to support every single version of IE… I think it’s safe to use it (it also removes the need to store tmp files on the server)
Thanks. Just the selected rows from the CSV are going to be stored in the data store. But to do so, first I need to show the content of the CSV to the user (graphically). So I have to read the content of the CSV first.
If I am going to do it in one of my own web app, what I will do is,
Upload the CSV to server temporary.(say tmp.csv) (I need a solution for this step in the DHIS context)
Read back the uploaded CSV(tmp.csv) show it to the user. (draw a chart in my case)
Allow the user to select the required data.
Save only the selected data(rows) to the database. (In DHIS, saving to the data store)
Delete tmp.csv
So what I really need is to do the same thing in step 1 above using the DHIS Web api.
Thanks.
On Thu, Jun 2, 2016 at 12:37 PM, Morten Olav Hansen morten@dhis2.org wrote:
Did you have a look at the data store API? [1], you could also use the user setting API to store it (if its small enough) [2]
Yes, display in a chart as a preview. Part of the data(selected rows) will be then saved as an attribute in a custom object. Custom object will then be persisted to the system. So there is no need of retrieving data from this fileSource later.
Thanks Halvdan. Since that is the case, I am going to locally process the files.
···
On Thu, Jun 2, 2016 at 6:41 PM, Halvdan Hoem Grelland halvdan@dhis2.org wrote:
To answer the original question: no, currently fileResource is only used as a backend for storing file content with DataValues. Extending it to more generic file store use cases is on the horizon, but it’s yet to be specified on the roadmap, unfortunately.
–
On Thu, Jun 2, 2016 at 10:09 AM, Morten Olav Hansen morten@dhis2.org wrote:
Yeah, I think it’s fairly recent… if you don’t have to support every single version of IE… I think it’s safe to use it (it also removes the need to store tmp files on the server)
Thanks. Just the selected rows from the CSV are going to be stored in the data store. But to do so, first I need to show the content of the CSV to the user (graphically). So I have to read the content of the CSV first.
If I am going to do it in one of my own web app, what I will do is,
Upload the CSV to server temporary.(say tmp.csv) (I need a solution for this step in the DHIS context)
Read back the uploaded CSV(tmp.csv) show it to the user. (draw a chart in my case)
Allow the user to select the required data.
Save only the selected data(rows) to the database. (In DHIS, saving to the data store)
Delete tmp.csv
So what I really need is to do the same thing in step 1 above using the DHIS Web api.
Thanks.
On Thu, Jun 2, 2016 at 12:37 PM, Morten Olav Hansen morten@dhis2.org wrote:
Did you have a look at the data store API? [1], you could also use the user setting API to store it (if its small enough) [2]
Yes, display in a chart as a preview. Part of the data(selected rows) will be then saved as an attribute in a custom object. Custom object will then be persisted to the system. So there is no need of retrieving data from this fileSource later.