package com.lutao.cloud.collect.controller;


import com.lutao.cloud.collect.service.StorageService;
import com.lutao.cloud.common.core.util.MessageInfo;
import com.lutao.cloud.common.security.annotation.Inner;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;


/**
 * 数据同步
 *
 * @author guoyc
 * @date 2019-06-18 17:18:42
 */
//@Api(value = "/sync", tags = {"同步数据"})
@RestController
@AllArgsConstructor
@RequestMapping("uploadfile")
@Slf4j
public class StorageController {

    private final StorageService storageService;



    @PostMapping
    @Inner(value = false)
    public MessageInfo doUpload(MultipartFile file) {
        return storageService.uploadImage(file);
    }

}
