高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public with sharing class FilePreviewDownVFController {
    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 FilePreviewDownVFController(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;
    }
}