Code Monkey home page Code Monkey logo

Comments (9)

timersys avatar timersys commented on May 19, 2024 21

Ok After googling around for problems with chrome and blob urls I found out that was my adblocker the one preventing the downloads.

Maybe would be nice to leave a note in the docs that AdBlock or similar software will prevent this to work. Also my previous links seemed to work so maybe you want to take a look.

from react-csv.

andynoelker avatar andynoelker commented on May 19, 2024 12

I was running into this same issue. For me the problem was that the target="_blank" attribute triggered my Adblock extension (v 3.27.0). Overriding this in the props allowed me to download the file.

<CSVLink data={this.state.data} target="" />

from react-csv.

deepaktatineni avatar deepaktatineni commented on May 19, 2024 1

This solved my issue with natively without react-CSV.

        const link = document.createElement('a')
        link.href = window.URL.createObjectURL(csv)
        link.download = `filenName.csv`
        link.dispathEvent(new MouseEvent('click'))

from react-csv.

timersys avatar timersys commented on May 19, 2024

This example seems to work in case you want to check it https://medium.com/@danny.pule/export-json-to-csv-file-using-javascript-a0b7bc5b00d2

from react-csv.

nosnaj avatar nosnaj commented on May 19, 2024

Using uBlock and experiencing the same issue. Is the link or download being done to standard?

from react-csv.

mriccid avatar mriccid commented on May 19, 2024

Can you please provide an example of code that won't download, the steps you took to download the file, as well as any other info about your browser and ad-blocking extensions?

from react-csv.

nosnaj avatar nosnaj commented on May 19, 2024

<CSVLink data={this.state.csvData} filename={"Revenue Report for " + this.state.monthNames[this.state.month] + ".csv"} className={styles.download} ><InputButton text="📥 Download Financial Report" /></CSVLink>

I'm using uBlock Origin (Version: 1.15.18) on Chrome (Version 65.0.3325.181 (Official Build) (64-bit)).

I think the download is being blocked as a pop-up.

from react-csv.

nosnaj avatar nosnaj commented on May 19, 2024

Thanks @andynoelker, worked like a charm.

from react-csv.

felipesousa avatar felipesousa commented on May 19, 2024

@timersys THANKS A LOT!

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.