I’ve got a problem uploading image files in my application. I don’t know if I’m the one not doing something the right way. Every time I upload an image i get a prompt indicating there was a server error in the process of uploading the file. Here’s how I implemented it and the response I get.
I created a static method called getUploadedImageAsStream() which receives an UPLOAD component as a parameter and return the uploaded file as a StreamResource.
In my UI, I created an instance of my uploaded file and stored the result in a StreamResource variable called ‘resource’. Then on successful Upload, I now display the image. But It seem not to be working, I’ve tried other methods too using Base64 encoder but also didn’t workout. Please what am I getting wrong here…