|
From: Matt S. <sga...@us...> - 2005-03-04 15:23:13
|
OK, I see what you're getting at now. The problem is, how do you want Spring to figure out the mime type if it's not based on file extension? By dynamically inspecting the contents of the file at runtime? I know that's possible because IE does it, but that seems like it would be a pain to implement. Is there some other approach you could take, like storing the mime type information external to the file itself? Matt Andy Depue wrote: > From what I can tell, this appears to be related to JavaMail? If so, it is > not what I need. I'm using Spring's Resource interface to access, well, > general resources. Some of these resources actually end up residing on a web > server, and may even have a .jsp file extension - even though the .jsp page > might end up generating a binary file of some specific mime type, which > the .jsp page will manually set on output. In this case I cannot rely on > file extension. It would be useful if the Resource interface could expose to > me a simple way to inspect the mime type. If it is a classpath/file/simple > resource, then it could use the activation framework and detect the mime type > by the file extension (hiding all the gory details from me) - if it is a > Resource loaded from a web server, then it could return the mime type that > was returned by the web server - and so on. Am I approaching this the wrong > way? > > - Andy |