tj
2025-03-28 b1ab565909e471dde643755e93633cb84872733b
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) {
@@ -73,10 +73,10 @@
                }
                // 2. 检查文件类型
                String contentType = avatar.getContentType();
                if (!ALLOWED_CONTENT_TYPES.contains(contentType)) {
                    throw new ValidationException("不支持的文件类型");
                }
//                String contentType = avatar.getContentType();
//                if (!ALLOWED_CONTENT_TYPES.contains(contentType)) {
//                    throw new ValidationException("不支持的文件类型");
//                }
                // 3. 生成文件名
                String fileName = "avatar/" + UUID.randomUUID().toString() +