irods-contrib / metalnx-web

Metalnx Web Application
https://metalnx.github.io/
BSD 3-Clause "New" or "Revised" License
36 stars 36 forks source link

If you edit a .csv file via 'preview', the content's format changes #293

Open jefscheepers opened 2 years ago

jefscheepers commented 2 years ago

What did you try to do?

I uploaded a CSV file, and tried to edit one of the values via 'view info' > 'preview'.

Original data:

Year,Inflation (%) 2021,0.7 2020,2.1 2019,1.7 2018,0.2 2017,0.1 2016,0.5 2015,1 2014,2.1 2013,2.7 2012,3.1 2011,0.2

Changed to:

image

Then I clicked on 'save'.

What did you expect? The contents would look as follows:

Year,Inflation (%) 2021,1.4 2020,2.1 2019,1.7 2018,0.2 2017,0.1 2016,0.5 2015,1 2014,2.1 2013,2.7 2012,3.1 2011,0.2

What happened?

The change seems applied, and I get an alert and green popup saying my changes have been successfully applied. However, when I exit and reenter the preview tab, it cannot load the file (it seems to load indefinitely): image

When I download the file, the format is now as follows:

data=2021%2C1.4+%0D%0A2020%2C2.1%0D%0A2019%2C1.7%0D%0A2018%2C0.2%0D%0A2017%2C0.1%0D%0A2016%2C0.5%0D%0A2015%2C1%0D%0A2014%2C2.1%0D%0A2013%2C2.7%0D%0A2012%2C3.1%0D%0A2011%2C0.2%0D%0A

Tested on Metalnx version 2.4.0 with iRODS 4.2.10.

korydraughn commented 1 year ago

Editing files via Metalnx feels out-of-scope.

Users are free to download, modify, and upload new versions of files without issue.

This feature should be removed.