dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05211
Re: Content type not allowed during DHIS 1.4 file import
Den 30. mars 2010 kl. 16.43 skrev Jason Pickering:
> Typically in the past, when I have seen this error message, I have added this to the web.xml file of Tomcat..
>
> <mime-mapping>
> <extension>zip</extension>
> <mime-type>application/application-octet</mime-type>
> </mime-mapping>
Ah, ok, that's the other way around, the content type set on resources tomcat is serving.
For file uploads, the content type of the request is multipart/form-data, with the uploaded file + content type in the request body. So generally it is not something the server container wants to mess with. We basically have three choices:
1) trusting what the client is reporting
2) have our own way of deducing based on the content itself (can be tricky and require resources on the server side).
3) have a separate form field, where the user explicitly states the file format
I guess we might want a combination of 2 and 3 for our use cases.
Jo
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
Follow ups
References