Reply to Re: SVG Images

Re: SVG Images new!
by Dave Buchholz, 5 years, 8 months ago
Just following this up, disabling mime_fileinfo gave me the correct file extension see log below but something that struck me was that when I did a print_r on $_FILES it has the correct mime type there ?

print_r($_FILES) gives Array
(
[src] => Array
(
[name] => cogs.svg
[type] => image/svg+xml
[tmp_name] => /usr/tmp/phpmyNgBK
[error] => 0
[size] => 3385
)

)

logs for this upload

system information
- class version : 0.35dev
- operating system : FreeBSD
- PHP version : 5.6.36
- GD version : 2.1.0
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 50M (52428800 bytes)
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Checking MIME type with Fileinfo PECL extension
    MAGIC path will not be used
    MIME type detected as text/plain; charset=us-ascii by Fileinfo PECL extension
- MIME validated as text/plain
source variables
- You can use all these before calling process()
    file_src_name : cogs.svg
    file_src_name_body : cogs
    file_src_name_ext : svg
    file_src_pathname : /usr/tmp/phpmyNgBK
    file_src_mime : text/plain
    file_src_size : 3385 (max= 52428800)
    file_src_error : 0
process file to ../../uploads/slides/kitchen-test/
- file size OK
- script renamed as cogs.svg.txt!
- file mime OK : text/plain
- file name safe format
- destination variables
    file_dst_path : ../../uploads/slides/kitchen-test/
    file_dst_name_body : cogs.svg
    file_dst_name_ext : txt
- checking for auto_rename
- destination file details
    file_dst_name : cogs.svg.txt
    file_dst_pathname : ../../uploads/slides/kitchen-test/cogs.svg.txt
- cogs.svg.txt doesn't exist already
- ../../uploads/slides/kitchen-test/ doesn't exist. Attempting creation: failed
- error: Destination directory can't be created. Can't carry on a process.Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important