mimetypes for zipped files

aleXXX alexander.neundorf at gmx.net
Mon Apr 8 21:58:07 BST 2002


On Monday 08 April 2002 14:46, David Faure wrote:
> On Sunday 07 April 2002 23:32, Alex Zepeda wrote:
> > On Sun, Apr 07, 2002 at 11:50:14AM +0200, aleXXX wrote:
> > > Do you have another suggestion which can be implemented without major
> > > problems for KDE 3.x ?
> >
> > Is there any way that having the appropiate ([gb]zip) filter slave modify
> > the resulting mimetype would work?
>
> Yes, one could decompress the file with one of the above, perform a
> mime-magic-from-contents on the beginning of the result, to get the inner
> mimetype... but then what? The next step is to launch the appropriate
> application / part,
> and either
> - feed it the compressed file, assuming the app can decompress it by itself
> (this might need some flag in the .desktop file saying "yes, I'm using
> KFilterDev so I can handle compressed files"
> - or feed it the uncompressed data. For parts, the new "streaming" API
> would allow just that. But for apps, I don't see a way.
>
> Anyway, alex's current approach is most probably to add support for
> KFilterDev in the apps, which fits the above first point. If apps can

Yes.

> handle compressed files just fine, the only missing bit is the mimetype
> determination (e.g. when clicking on a file in Konq, i.e. more generally in
> KRun), to launch the right app. If that's done using the above, then
> there's no need for combined mimetypes like application/postscript-gzip
> etc.

I.e. app/postscript-gzip would be simply also app/postscript ?
Yes, this was basically my question whether we'd need new mimetypes or not.

Well, here's my source.
Of course it could be simply modified to return only the "inner" mimetype.

Bye
Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kmimemagic.cpp.diff
Type: text/x-diff
Size: 2097 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20020408/8e0e2b41/attachment.diff>


More information about the kde-core-devel mailing list