That would be processed on every file opening.

I'm looking into something more generic and handle it on server side.

You can eg. serve a file via webdav or standard http and a nifty
interface, you have to give the right mime type. That would not be
gtk-client related.
The  set_mime could be processed either by filenameextension or a
/usr/bin/file kind of recognition on server side.

tobias

On 08.11.2010 11:11, grasbauer wrote:
> (nothing approved - only a public brainstorming ;)
>
> if you have an extension and you are on windows:
>
> os.startfile opens the right application
>
> if you dont have an extension and you are on windows, something like
>
> subprocess.Popen("/usr/bin/file -i path", shell=True, \
> stdout=subprocess.PIPE).communicate()[0]
>
> can give you a hint which mime-type to espect. With this you can add
> an extension to a named tempfile.
>
> is ist like this????
>
> Jan
>
>
>
>
> On 8 Nov., 11:01, Tobias Paepke <[email protected]> wrote:
>   
>> On 06.11.2010 17:57, C dric Krier wrote:
>>
>>
>>
>>     
>>>> If people is uploading from linux without extension, someone has to
>>>> write or find a huge mime-type2extension map ;)
>>>>         
>>     
>>> There is no mime-type send to the server so it is not possible.
>>>       
>> imho there should exist a mime type field. Or additionally a get_mime
>> function. It would make file handling way easier.
>>
>> tobias
>>     
>   

-- 
[email protected] mailing list

Reply via email to