Forums / Developer / Import SVG files via webdav [SOLVED]

Import SVG files via webdav [SOLVED]

Author Message

Salvatore Guarino

Wednesday 22 October 2008 3:51:28 am

I have a little problem importing file with svg extension via webdav. The problem is that eZpublish by default uses the image class to create the object importing svg files via webdav, but I would like that it uses the file class. In fact using image class to upload manually (via admin interface) an svg files it's not possible, due to an eZpublish error that indicate that svg file is not a valid image. The automatically detected MIME type of svg files is [image/svg+xml] (I can see this uploading an svg file using the file class), so I tried to edit the file override/webdav.ini.append adding the following row:

MIME[image/svg+xml]=file

I cleared the cache, but when I copy an svg file using webdav ezp always uses image class to create the object...

Any Idea?

Thx in advance!
Salvatore

Salvatore Guarino

Thursday 23 October 2008 5:34:14 am

SOLVED!
I found this in webdav.ini:

# DEPRECATED: WebDAV will use the settings in upload.ini
#
# Setting per mimetype to select which class to create.
#
[PutSettings]
MIME[image/jpeg]=image
MIME[image/pjpeg]=image
MIME[image/gif]=image
MIME[image/tiff]=image
MIME[image/psd]=image
MIME[image/bmp]=image
MIME[image/psd]=image
MIME[image/png]=image
MIME[text/plain]=file
DefaultClass=file

so I added the mime type in override/upload.ini.append.php and now it's working fine!

Thx and bye!