public with sharing class ImgPreviewVFController {
    public String staticResource {get; set;}
    public String fileKey {get; set;}
    public String fileName {get; set;}
    public String type {get; set;}
    public String hostUrl {get; set;}
    public ImgPreviewVFController(ApexPages.StandardController controller) {
        staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));
        Pagereference pf = ApexPages.currentPage();
        if(pf != null){
            fileKey = pf.getParameters().get('key');
            fileName = pf.getParameters().get('name');
            type = pf.getParameters().get('type');
        }
        AWS_Integration_Info__mdt awsConfiguration = [SELECT Host_URL__c FROM AWS_Integration_Info__mdt  WHERE DeveloperName = 'AWS_Default_Configuration'];
        if (awsConfiguration == null) {
            System.debug('AWS_Integration_Info__mdt没配置');
        }
        hostUrl = awsConfiguration.Host_URL__c;
    }
}