Code Monkey home page Code Monkey logo

Comments (16)

jaketrimble avatar jaketrimble commented on May 19, 2024 3

Our windows users are also experiencing this issue: That is, using CSVLink, file is downloaded without an extension.

from react-csv.

brunocascio avatar brunocascio commented on May 19, 2024 1

I am facing the same issue using CSVDownload on Chrome (Windows) but it is working fine on OSX.

from react-csv.

codetony25 avatar codetony25 commented on May 19, 2024

I believe this happens on windows only, correct?

from react-csv.

mccabemj avatar mccabemj commented on May 19, 2024

@kamarajuPrathi what issue are you having? If this is windows, its generally recommended to not have more than the one "." in the filename. This is likely not a react-csv issue

from react-csv.

ran-eh avatar ran-eh commented on May 19, 2024

On both windows and linux, it does not prompt you for a file name and directory. When you click the icon, it immediately downloads the file into the default download directly, with prop.filename as the file name and with no extension. On OSX it prompts and adds the csv extension.

from react-csv.

ran-eh avatar ran-eh commented on May 19, 2024

Correction: the "not prompting" is a browser setting. If it is set not to prompt (which is the default), then it saves the file without the cvs file extension on windows and linux, with on osx.

from react-csv.

noscripter avatar noscripter commented on May 19, 2024

Could this issue be related to browser MIME compatibility?

from react-csv.

realripley00 avatar realripley00 commented on May 19, 2024

Has anybody figured out a solution for this? It seems to only effect any browser on Windows.

from react-csv.

jpmoyn avatar jpmoyn commented on May 19, 2024

+1 experiencing this issue on Windows

from react-csv.

firyalff avatar firyalff commented on May 19, 2024

Workaround (hacky way) for this issue is to detect user agent's OS type. You can use https://github.com/duskload/react-device-detect to detect user's OS, and then add file extenstion (.csv) manually on non macOS user @kamarajuPrathi

from react-csv.

albcl avatar albcl commented on May 19, 2024

Is there any plan on fixing this? I find this issue quite a big one as it's affecting any browser on Windows (also saw this happening on Android, iOS and Linux, by the way)

from react-csv.

shobhitjaintookitaki avatar shobhitjaintookitaki commented on May 19, 2024

This is still happening on Windows OS, although working fine on OSX

from react-csv.

emcarru avatar emcarru commented on May 19, 2024

If anyone needs a quick fix for this one, what fixed it for me was manually adding '.csv' to the end of the filename that is passed to react-csv.

e.g. From a quick test, this works:

<CSVLink data={csvData} filename="Your filename.csv">Download me</CSVLink>;

There is a function already in the example website that does this.

Probably adding this logic to Link.js would fix it?

from react-csv.

matheusnasser avatar matheusnasser commented on May 19, 2024

Workaround (hacky way) for this issue is to detect user agent's OS type. You can use https://github.com/duskload/react-device-detect to detect user's OS, and then add file extenstion (.csv) manually on non macOS user @kamarajuPrathi

But how do i manually add that ?

from react-csv.

firyalff avatar firyalff commented on May 19, 2024

@matheusnasser you can append .csv to filename props inside if else statement.

from react-csv.

williams335 avatar williams335 commented on May 19, 2024

This can help to solve the problem:
#72 (comment)

from react-csv.

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.