[pmwiki-users] gnumeric uploads
Patrick R. Michaud
pmichaud at pobox.com
Wed Apr 6 11:43:17 CDT 2005
On Wed, Apr 06, 2005 at 11:52:39AM -0400, Russ Fink wrote:
> Is there a known application extension for Gnumeric spreadsheets?
> Also, I think I need to edit scripts/uploads.php and add a new line in for
> Gnumeric. In general, how does one go about adding new types to the
> system? I'm using pmwiki-2.0.beta26.
No, don't edit scripts/uploads.php! :-) It's a local customization,
see http://www.pmwiki.org/wiki/Cookbook/UploadTypes . For Gnumeric,
I would guess this to be
$UploadExts['gnumeric'] = 'application/x-gnumeric';
> Going forward, is there a general way to add a ".bin" extension for generic
> binary data that would force the browser to try and save it when the user
> clicks on the uploaded file?
How the browser saves a file is handled as a negotiation between
the browser and the webserver, without anything that PmWiki can
(currently) do about it. (PmWiki only provides links to the attachments,
it doesn't actually send the attachments.) You'd need to configure your
webserver so that files of type '.bin' have a type of
'application/octet-stream', which (I think) tells most browsers to
download and save the file to disk rather than open it with an application.
More information about the pmwiki-users