Skip to main content

Posts

CORS, S3 and Chrome

There was an issue that I could not figure out what was going on until last minute of the release. I decided to write about it as the solution was very simple,it is a hint given to me by a genius, my fellow colleague . Let me describe the issue first. I wanted to generate a PDF in the browser and used Pdf make , which is an awesome javascript library, works well with data tables. There was a requirement to add the logo/image to the page header. The logo is already loaded on the page as and the image was stored in S3. When a user prints the PDF, it will download the image via ajax call(then cache it). So it was a simple implementation what I had to implement the ajax call and convert to image data URL and pass it to the pdfmake( Currently, pdf make only accepts base64 image dataurls as it is not asynchronous PDF generation ). Every time I try to print, Chrome throws " No 'Access-Control-Allow-Origin' header is present on the requested resource". What could be t
Recent posts

THE LAST LECTURE

Ultimately I was a able to read a non-fictional book till the end page. This is another great achievement in my life :) since I was used to read only the academic book which I was asked to read at university or I had read to gain some knowledge in programming. But my fiance is fond of reading.She urges me to read every day some times she gave some fictions to read but some how I didn't have continuous habit of reading :(.When I came to India last time I was certainly fascinated to the book of The Last Lecture by Randy Pausch .I just read about half of the book when I was in India last time unfortunately it took another two months to come back again read the other half.Ultimately I was able to finish to the book. It seems to me that this book has changed me a lot. Actually when I was reading the book , the feeling of doing higher studies came to my mind. And also it encourage to read a lot.And this time I have bought three books already,plan to buy more and definitely finish all

Good Bye WSO2

Today is the last day of my beloved company WSO2. I joined here just passing out from the university and it is about one and half years that I have been working here. It is very much enjoyable and pleasure to work here. The culture in WSO2 is much different from all the other software companies in Sri Lanka. FREEDOM is the most important thing. We can do our work without any pressure because our senior management does not push us and they are very much helpful. The most important thing is that our CEO Dr.Sanjiva Weerawarana is very much friendly person. I have not seen such a management person with such kind of attitudes. He is giving every thing to his employee's what he is capable of. I am proud of him as Sri Lankan since he is keen on developing our country by motivating people to educate. And I should note about my boss Mr.Samisa Abeysinghe who has a huge experience in this industry. Since I had a chance to work under him I could gain much knowledge about software process. He