classes/Tools/Storage/StorageTool.php
private function doRenderStorageInfoMeta($postId = null, $readOnly = false) {
		global $post;

		if(empty($postId)) {
			$postId = $post->ID;
		}

		$meta = wp_get_attachment_metadata($postId);
		if(empty($meta)) {
			return;
		}

		if(!isset($meta['s3'])) {
			$meta = get_post_meta($postId, 'ilab_s3_info', true);
		}

		if(empty($meta) || !isset($meta['s3'])) {
			?>
            Not uploaded.
			<?php
			die;
		}

		$type = arrayPath($meta, 'type', false);
		if (empty($type)) {
			$type = get_post_mime_type($postId);
        }

		if(strpos($type, 'image') === 0) {
			$this->doRenderStoreageInfoMetaImage($postId, $meta, $readOnly);
		} else {
			$this->doRenderStorageinfoMetaDocument($postId, $meta, $readOnly);
		}
	}
private function doRenderStorageInfoMeta($postId = null, $readOnly = false) {
		global $post;

		if(empty($postId)) {
			$postId = $post->ID;
		}

		$meta = wp_get_attachment_metadata($postId);
		if(empty($meta)) {
			return;
		}

		if(!isset($meta['s3'])) {
			$meta = get_post_meta($postId, 'ilab_s3_info', true);
		}

		if(empty($meta) || !isset($meta['s3'])) {
			?>
            Not uploaded.
			<?php
			die;
		}

		$type = arrayPath($meta, 'type', false);
		if (empty($type)) {
			$type = get_post_mime_type($postId);
        }

		if(strpos($type, 'image') === 0) {
			$this->doRenderStoreageInfoMetaImage($postId, $meta, $readOnly);
		} else {
			$this->doRenderStorageinfoMetaDocument($postId, $meta, $readOnly);
		}
	}
private function doRenderStorageInfoMeta ( $ postId = null , $ readOnly = false ) { global $ post ; if ( empty ( $ postId ) ) { $ postId = $ post -> ID ; } $ meta = wp_get_attachment_metadata ( $ postId ) ; if ( empty ( $ meta ) ) { return ; } if ( ! isset ( $ meta [ 's3' ] ) ) { $ meta = get_post_meta ( $ postId , 'ilab_s3_info' , true ) ; } if ( empty ( $ meta ) || ! isset ( $ meta [ 's3' ] ) ) { ?>
            Not uploaded.
			<?php die ; } $ type = arrayPath ( $ meta , 'type' , false ) ; if ( empty ( $ type ) ) { $ type = get_post_mime_type ( $ postId ) ; } if ( strpos ( $ type , 'image' ) === 0 ) { $ this -> doRenderStoreageInfoMetaImage ( $ postId , $ meta , $ readOnly ) ; } else { $ this -> doRenderStorageinfoMetaDocument ( $ postId , $ meta , $ readOnly ) ; } }
Renders the Cloud Storage metabox
@param $postId
@param $readOnly
Renders the Cloud Storage metabox