cloudroam
2025-03-29 5997dc8acfa81a6c867c28810d1c3c9714efc46c
src/main/java/com/mzl/flower/web/supplier/SupplierController.java
@@ -33,7 +33,7 @@
@Slf4j
public class SupplierController extends BaseController {
    private static final R ALLOWED_CONTENT_TYPES = R.valueOf("jpg");
//    private static final R ALLOWED_CONTENT_TYPES = R.valueOf("jpg");
    private final SupplierService supplierService;
    public SupplierController(SupplierService supplierService) {
@@ -74,9 +74,9 @@
                // 2. 检查文件类型
                String contentType = avatar.getContentType();
                if (!ALLOWED_CONTENT_TYPES.contains(contentType)) {
                    throw new ValidationException("不支持的文件类型");
                }
//                if (!ALLOWED_CONTENT_TYPES.contains(contentType)) {
//                    throw new ValidationException("不支持的文件类型");
//                }
                // 3. 生成文件名
                String fileName = "avatar/" + UUID.randomUUID().toString() +