Home forums Using CanvasJS how convert blob type in to data url using spring MVC?

This topic contains 7 replies, has 2 voices, and was last updated by  Vishwas R 3 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #21920

    adirgapalit
    Member

    I’m creating a Spring MVC application. I also have a dataTable in the MySQL database. Inside the database, there is a table, and inside the table consist of several columns. One of the columns has type data “LONGBLOB” (the name of the column is file_data)

    link to the picture: https://drive.google.com/open?id=1Z4HeJ_CcqASD5qRTXFNC3BlKnAWkiaSF

    The picture is the content of 1 “file_data”. 1. How to convert the file_data which has longblob type to data url?

    There are some tutorials/discussions about this topic in internet, but mostly using javascript. I have not get idea how convert it by using spring mvc.

    #21924

    Vishwas R
    Keymaster

    @adirgapalit,

    I don’t see any column with the name ‘file_data’ of the type LONGBLOB in the screenshot that you have shared! Please checkout this tutorial on Saving/Retrieving BLOB object in Spring MVC.

    If there is any issue integrating CanvasJS in your Spring MVC project, please download the Sample project from our download page. If you have any other issues, kindly create sample project along with sample database and share it over Google-Drive or Onedrive so that we can look into your code, understand it better and help you out?


    Vishwas R
    Team CanvasJS

    #21929

    adirgapalit
    Member

    this is the table in mysql

    if you can not access the picture above you can access using this link: https://drive.google.com/open?id=1rBVBXectaONGo27C4cTZx3bZcTfdw5WO

    And the content inside the second column on the picture I have posted before.

    • This reply was modified 3 months ago by  adirgapalit.
    #21933

    adirgapalit
    Member

    in here, canvasjs.com/spring-mvc-charts/chart-from-csv-data you can get the csv from data URL.

    and then, I have data in mysql type longblob that save CSV file. do you have idea, how to conver blob type into data-url like your code?

    #21939

    Vishwas R
    Keymaster

    @adirgapalit,

    Can you kindly share sample project along with sample database over Google-Drive or Onedrive, so that we can look at your code, understand it better and help you out?

    This tutorial on Saving/Retrieving BLOB object in Spring MVC might help you handle the scenario you have described above.


    Vishwas R
    Team CanvasJS

    #21942

    adirgapalit
    Member

    Thank you, but can I send you the link via private email? because I can not share as public in here.

    #21944

    adirgapalit
    Member

    Hi again,

    I also try this code https://canvasjs.com/jsp-charts/chart-from-csv-data/

    But when I try the content of chart does not appear.

    no content on the chart

    And this is the following error:

    Failed to load https://canvasjs.com/data/gallery/jsp/tuna-production.csv: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

    could you please help me, why this happen?

    • This reply was modified 3 months ago by  adirgapalit.
    • This reply was modified 3 months ago by  adirgapalit.
    #21959

    Vishwas R
    Keymaster

    @adirgapalit,

    Thank you, but can I send you the link via private email? because I can not share as public in here.

    One of team members will get in touch with you soon over email.

    I also try this code https://canvasjs.com/jsp-charts/chart-from-csv-data/
    But when I try the content of chart does not appear.
    And this is the following error: Failed to load https://canvasjs.com/data/gallery/jsp/tuna-production.csv: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8080’ is therefore not allowed access.

    For security reasons, browsers restrict cross-origin requests. Please refer this stackOverflow post for more information.


    Vishwas R
    Team CanvasJS

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.