Is the MIME type ‘image/jpg’ the same as ‘image/jpeg’?

No, image/jpg is not the same as image/jpeg. You should use image/jpeg. Only image/jpeg is recognised as the actual mime type for JPEG files. See, . Serving the incorrect Content-Type of image/jpg to IE can cause issues, see

Force download of ‘data:text/plain’ URL

As of now, it has been made possible to use <a download> in Chrome. Using dispatchEvent, you can download any string as file (even with a custom filename) whenever you want. Here’s a utility function to use it: var downloadFile = function(filename, content) { var blob = new Blob([content]); var evt = document.createEvent(“HTMLEvents”); evt.initEvent(“click”); $(“<a>”, … Read more

ASP.Net MVC – Read File from HttpPostedFileBase without save

This can be done using httpPostedFileBase class returns the HttpInputStreamObject as per specified here You should convert the stream into byte array and then you can read file content Please refer following link] Hope this helps UPDATE : The stream that you get from your HTTP call is read-only sequential (non-seekable) and the FileStream … Read more

How can I tell how many objects I’ve stored in an S3 bucket?

Using AWS CLI aws s3 ls s3://mybucket/ –recursive | wc -l or aws cloudwatch get-metric-statistics \ –namespace AWS/S3 –metric-name NumberOfObjects \ –dimensions Name=BucketName,Value=BUCKETNAME \ Name=StorageType,Value=AllStorageTypes \ –start-time 2016-11-05T00:00 –end-time 2016-11-05T00:10 \ –period 60 –statistic Average Note: The above cloudwatch command seems to work for some while not for others. Discussed here: Using AWS Web … Read more