It sounds like your Flarum installation is blocking certain file types. You can fix this by going to Admin > Extensions > Upload and checking the Allowed file types list. Make sure the file type you’re trying to upload (like .png, .jpg, .pdf, etc.) is included there.
If it’s already allowed and still not working, clear the cache or try disabling other extensions temporarily to see if there’s a conflict.