Newer
Older
newfiber-termite / newfiber-termites / newfiber-termites-package / src / test / java / CommonTest.java
@xiongkai xiongkai on 5 Jun 453 bytes 对接云存储
import com.newfiber.common.core.utils.file.FileUtils;
import com.newfiber.termite.util.CosUtil;
import java.io.File;
import org.junit.Test;
import org.springframework.web.multipart.MultipartFile;

public class CommonTest {

    @Test
    public void fileUploadTest(){
        MultipartFile file = FileUtils.getMultipartFile(new File("C:\\Users\\Administrator\\Pictures\\201210133348076.jpg"));
        System.out.println(CosUtil.putFile(file));
    }
}