mimetypes for zipped files
David Faure
david at mandrakesoft.com
Mon Apr 8 13:46:36 BST 2002
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 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.
--
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
More information about the kde-core-devel
mailing list