package com.artfess.file.service.impl;


import com.artfess.file.model.DefaultFile;
import com.artfess.file.service.FilePreview;
import com.artfess.file.util.FileUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author : kl
 * @authorboke : kailing.pub
 * @create : 2018-03-25 上午11:58
 * @description:
 **/
@SuppressWarnings(value = {"unchecked", "rawtypes"})
@Slf4j
@Service
public class MediaFilePreviewImpl implements FilePreview {

    @Autowired
    FileUtils fileUtils;


    @Override
    public String filePreviewHandle(DefaultFile fileMode, Map map) {
        String mediaUrl = fileMode.getProp4();
        map.put("mediaUrl", mediaUrl);
        return "media";
    }

}
