Giter VIP home page Giter VIP logo

Comments (4)

OvidijusParsiunas avatar OvidijusParsiunas commented on May 27, 2024

The input element which opens up the file browser for importCSV method and the import button in csvButtons has been set up to only accept .csv format files (code here).

Are you still able to import non .csv file formats? If so, may I ask if you are able to see them in your file manager before confirming the upload. And what kind of an operating system you are running on? (A screenshot would also be great!)

from active-table.

sbachiller avatar sbachiller commented on May 27, 2024

Even though the input element only accepts .csv files, you can change the selector in the file manager and import, for example a png file on Ubuntu 22

imagen

from active-table.

OvidijusParsiunas avatar OvidijusParsiunas commented on May 27, 2024

I see what you mean. I did some more research on this and it turns out that there is no bullet proof way to prove that the uploaded file is technically CSV. Aside from narrowing down the available file selection by extension, the code can also check the first couple of bytes of the uploaded file to see if they correspond to characters that are common for CSVs like "ID" and "EF", however these are not standardised and there can be scenarios where these characters are not present in valid CSVs. Hence, I could be invalidating valid cases.

Unfortunately, the bottom of the line is that if users are uploading .csv files that have incorrect binary properties, it has to be up to them to fix on their end as there is no ultimate technical solution for this.

Another two cents from a security perspective: because this is a web component that runs entirely on the client side, the JavaScript can always technically be manipulated and if someone deliberately wants to upload a non valid CSV, they will always be able to. Hence, the component can only do its best to narrow down the file selection for their convenience.

Hope this makes sense and I appreciate your concern!

from active-table.

OvidijusParsiunas avatar OvidijusParsiunas commented on May 27, 2024

I am closing this issue as it will not be pursued any further for the time being.

from active-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.