Changes to demo to use the mime type from JS, change name extension to jjpg and force ajax refresh the download button so that it downloads the image properly