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!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 00:19:31
Script start
Timing: Jan 31 2025 00:19:31
Module start 'layout'
Timing: Jan 31 2025 00:19:31
Module start 'content'
Timing: Jan 31 2025 00:19:31
Module end 'content'
Timing: Jan 31 2025 00:19:31
Script end

Main resources:

Total runtime0.0210 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.1406151.2109
Module start 'layout' 0.00460.0031 739.3516220.7031
Module start 'content' 0.00770.0118 960.0547997.9297
Module end 'content' 0.01950.0014 1,957.984429.9922
Script end 0.0209  1,987.9766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002210.4583140.0002
Check MTime0.00094.4430140.0001
Mysql Total
Database connection0.00062.838710.0006
Mysqli_queries0.002311.195630.0008
Looping result0.00000.067110.0000
Template Total0.00104.710.0010
Template load0.00083.655610.0008
Template processing0.00021.063810.0002
Override
Cache load0.00062.644210.0006
General
dbfile0.002411.461880.0003
String conversion0.00000.042140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs