feat (patient): upload done

This commit is contained in:
dpurbosakti
2025-09-24 14:24:57 +07:00
parent 016fcc667c
commit f618a2d6d0
10 changed files with 229 additions and 37 deletions
+1 -2
View File
@@ -38,9 +38,8 @@ func getValidFileTypesForBucket(bucketName string) []string {
}
// isValidFileType checks if the uploaded file type is allowed for the specific bucket
func isValidFileType(filename, bucketName string) bool {
func IsValidFileType(ext, bucketName string) bool {
allowedTypes := getValidFileTypesForBucket(bucketName)
ext := strings.ToLower(filepath.Ext(filename))
for _, allowedExt := range allowedTypes {
if ext == allowedExt {