Question

I've got a problem where I'm trying to add the ability to upload an MP4 to an existing Java app that previously handled FLVs.

The Flash is stopping the process, because it receives this helpful error:

{
    "error": 0,
    "message": null,
    "payload": null
}

And the Java shows this error:

 > 110677 [qtp868385821-30] WARN org.jets3t.service.utils.Mimetypes -
 > Unable to find 'mime.types' file in classpath

However, the upload continues and works fine.

Ive tried adding the mime.types file to the classpath, and it doesn't seem to make any difference. I've added the mp4file type to mime.types

 video/x-mp4            mp4

Any idea how I get the server to either accept mp4s, or stop sending the error so the rest of the application can do its thing?

Était-ce utile?

La solution 2

JetS3t includes a mime.types file in the classpath root. This is the file Synchronize expects to find in the classpath, is this file present in your configs directory? If not, you may need to replace it.

If you don't wish to use the mime.types file to guess the mimetype of your files, you can get rid of the warning message by changing the following line in

log4j.properties:

log4j.logger.org.jets3t.service.utils.Mimetypes=INFO

to read:

log4j.logger.org.jets3t.service.utils.Mimetypes=ERROR

Autres conseils

Try including the mime.type in src/main/resources if you're using Gradle. An example mime.type file is found in the project source code.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top