feat (patient): upload done
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user