get object metadata with HEAD; detect and set mime type before uploading