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 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');
        }
    }
}