score:1
Accepted answer
The error was that
strFile.replace(' ', '+');
needed to be
strFile = strFile.replace(' ', '+');
This is needed as posting the string will convert '+' characters to spaces.
The code works well now, I'm able to save Highchart charts in png files on the server side
score:1
Try changing this line:
byte[] decoded = Base64.decodeBase64(strFile);
If you are sending the full image as request:
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
System.out.println("request: "+request);
if (!isMultipart) {
System.out.println("File Not Uploaded");
} else {
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
List items = null;
try {
items = upload.parseRequest(request);
System.out.println("items: "+items);
} catch (FileUploadException e) {
e.printStackTrace();
}
}
Source: stackoverflow.com
Related Query
- Highcharts and Java: saving image on server side
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts server side image generation, how to set up legend labelFormatter in callback argument
- Highcharts SVG Export from Python Server Side Code
- Run Highcharts on Server side code to add to Word document
- Exporting Charts on server side with Highcharts and PhantomJS to make a custom PDF
- Server side chart .svg export with Highcharts and PhantomJS, error loading data from .csv file
- Java Server Based Highcharts and width limitation
- Export Highcharts to PDF (using javascript and local server - no internet connection)
- How to add image in Highcharts Title and subtitle
- Generation of svg on server side using highcharts
- Highcharts - Global configuration with common code and unique data & Headings
- Highcharts server side rendering draw a mysterious semi circle donut shape
- highcharts change rendered image source on click
- HighCharts Export Server not creating image
- Converting high chart to image and send to server using ajax call
- Getting an image (eg svg) created on the client in javascript, back to the server side for c#
- Building dynamic HighCharts and image Highcharts with (mostly) one codebase?
- Highcharts Export server - Can't generate image using --options
- Highcharts Server side generation not working on windows 2008 server
- setRequestHeader Error When Saving Canvas as Image on Server
- Highcharts server side export Pie With Data Labels (phantomjs)
- Converted PHP code that built an array to JS and now highcharts doesn't work - what did I do wrong?
- highchart save image using exporting java and phantomjs
- Server-side c# and client side javascript with json loading Highcharts gantt chart Task Progress Indicator, need to change Tooltip and Label name
- Align second scatter series to the side similar to how column and bar charts do using HighCharts
- Highcharts - Providing different range value in positive and negative side for Y-axis
- Highcharts - Java exporting server in GWT app
- Highcharts organization change size image and position
- Highcharts with ajax/ json and SQL Server ASP.NET
More Query from same tag
- Highcharts column chart rendering transparent columns in IE8
- Highcharts too slow when plotting 4000 bars (rCharts)
- Drilldown and title update in Highcharts pie
- Alignment issue in high charts
- DotNet HighCharts , Populates a pie with the result of a query
- Primary and Secondary yAxis zero on different levels
- How do I add secondary axis to highstock charts?
- How to unite function index and function data to one new function?
- Show multiple Y axis stacked one upon the Other in Highchart Line type graph
- Align titles for multiple axis in Highstock
- Highcharts: How to reduce label width / height
- Setting the top value for a highcharts chart
- How to disable dragging of Highcharts annotations?
- rCharts hPlot groups order
- Add labels to columns in highcharts pie chart legend
- Highcharts - programmatically slice
- Display label stack Label in Highcharts
- Highcharts-legend-item.last() disappears when changing tab
- Two columns with two legend items in highchars.js
- Highcharts memory leak when using jQuery 2.X
- Load HighCharts though .NET Ajax Call
- How to align multiple charts with different data
- Can we have tickposition both outside and inside in highcharts?
- Why are the xAxis labels in my Highcharts graphic so strangely positioned?
- Highchart - hide name in legend if no data
- Highcharts zoom issue when panning reversed xAxis
- Highchart heatmap plot x-axis on time and y-axis on string
- style highmaps mapbubbles onclick
- Get base64 image from public highchart export server
- Include Third party Charting plugins with ExtJs 5