add bulk upload pengadaan

This commit is contained in:
dirgantarasiahaan
2023-06-07 09:27:03 +07:00
parent 2415c7cc7c
commit a2d9f5e8b5
17 changed files with 479 additions and 3 deletions
@@ -14,6 +14,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.awt.image.BufferedImage;
import java.sql.Timestamp;
@@ -118,4 +119,9 @@ public class CommonService {
return MatrixToImageWriter.toBufferedImage(bitMatrix);
}
public boolean hasExcelFormat(MultipartFile file) {
String type = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
return type.equals(file.getContentType());
}
}