Forum OpenACS Q&A: File upload type

Collapse
Posted by James Harris on
I've just installed OpenACS 4.5 on a development machine at work and
have spent the last couple of days playing around with it.

It seems to be working quite well with one exception.  Any file
uploads for the bulletin board or file storage module always seem to
be uploaded as text/plain which obviously messes with things like
Word documents.  Is there any way of fixing this?

BTW - Thanks to all those involved in the documentation project (as
well as those developing obviously) - the instructions were very
clear and made OpenACS 4.5 much easier to install than 3.

Collapse
Posted by Don Baccus on
No, they shouldn't all be text/plain ... could you file a bug report in the SDM?  Even better, check Simon Millward's acceptance test site and sign up for file storage testing :)
Collapse
Posted by defunct defunct on
Yes, please do. Just register and then select 'I'll volunteer' I can then give you write permission...

If you're using a package anyway, even if you can't test all of it, you'll probably find you're covering off at least a few of the tests (and hopefully helping us to create a complete list too).

As a more general note, to anyone else reading this, if you are using a package at the moment, the I'd greatly appreciate you taking the time to record things you do (test types) and what happened when you tried to do them (test results)..

In this way your efforts indirectly help the OpenACS too.
We get to build up a full list of possible tests over time as a by product.

Cheers
Simon

Collapse
Posted by Jowell Sabino on
You can also help aolserver by adding mime types in the ns/mimetypes section of your configuration file:
ns_section "ns/mimetypes" 
ns_param   default         "*/*"     ;# MIME type for unknown extension. 
ns_param   noextension     "*/*"     ;# MIME type for missing extension. 
ns_param   ".xls"          "application/vnd.ms-excel" 
ns_param   ".doc"          "application/msword" 
I don't think MS Office file extensions are included in the default mime types known by aolserver.
Collapse
Posted by James Harris on

Adding

ns_param   ".doc"          "application/msword" 

seems to have fixed the problem with the file type. Surprisingly (at least for me) .xls was already in the configuration file.

I have discovered another problem. Although the file is saved and displayed as filename.doc is is always downloaded as index.doc.

Don and Simon - yes I will sign up as a tester. Keep up the great work.