Page 1 of 1
.dwg files
Posted: 08 Dec 2013, 22:32
by alvin152
I am trying to upload DWG files they are CAD drawing for architects and I keep getting an error when I try to upload them. Can I use DWG files with Phoca Download and how do I go about doing that?
Thanks
Troy
Re: .dwg files
Posted: 11 Dec 2013, 18:30
by Jan
Hi, just set the dwg file mime type to allowed file types in Options.
possible mime types: application/acad, application/x-acad, application/autocad_dwg, image/x-dwg, application/dwg, application/x-dwg, application/x-autocad, image/vnd.dwg, drawing/dwg
Or disable the checking file feature.
Jan
Re: .dwg files
Posted: 04 Mar 2016, 23:23
by joomla123lt
I turned of MIME checking for DWG files, so I'm able to upload these files too.
But I want also to have a MIME icon for DWG files.
I figured it out, that MIME icons are stored in media/com_phocadownload/images/mime, but I don't understand, what file name has to be for Phoca Download to automatically pick it up.
I added MIME type {dwg=application/acad} both to upload and download options, and tried to upload icon of size 64 px icon-dwg.pngto 64 folder, but it is not being picked up and this results in displaying empty image next to the file name.
Though icon-pdf.png from the same folder is being picked up just fine.
Re: .dwg files
Posted: 04 Mar 2016, 23:51
by joomla123lt
Adding all above mentioned MIME types didn't help.
What are the rules for naming icon files?
E.g. I could find icon-spreadsheet.png and icon-presentation.png, but no mentioning of similar types in MIME list of Phoca Download.
Re: .dwg files
Posted: 05 Mar 2016, 21:01
by Jan
Hi, see the file:
administrator\components\com_phocadownload\libraries\phocadownload\file\file.php
method: public static function getMimeTypeIcon
There you can set the extension and its icon.
Jan
Re: .dwg files
Posted: 06 Mar 2016, 14:56
by joomla123lt
Thank you, Jan.
I added:
and it worked.
Re: .dwg files
Posted: 08 Mar 2016, 20:18
by Jan
Great to hear it.
Jan