I need to write a CGI program to return an IFS File for display in browser. That IFS file could be in a number of document/image formats (rtf, doc, docx, pdf, png, etc.)
Is there a way I can automatically identify and use the appropriate MIME Type from the file extension? E.g. look up .pdf and get application/pdf? Short of creating my own mime type lookup table.
The CGI Program will be written in RPGLE (Actually RPGsp unless there's a really good reason why this would be better as regular RPGLE), and I think we are using Apache
Is there a way I can automatically identify and use the appropriate MIME Type from the file extension? E.g. look up .pdf and get application/pdf? Short of creating my own mime type lookup table.
The CGI Program will be written in RPGLE (Actually RPGsp unless there's a really good reason why this would be better as regular RPGLE), and I think we are using Apache
Comment