java – Error while adding IOS *.caf file as if application/octet-stream

0
165


I am trying to upload a file (sample1.caf) downloaded on the following page:

https://filesamples.com/formats/caf

While downloading, I check the file type and let upload to continue if the file type is "audio/x-caf". However, although I let the x-caf file and upload a caf file, I get “Upload of file of type application/octet-stream to Swift is not allowed.” error.

Here is the method used to check the file type:

public String detect(InputStream stream) throws IOException {
    return this.detect(stream, new Metadata());
}

So, is there an incompatibility between the allowed file type and the file type of that file? Or should I also add application/octet-stream to the allowed types?