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
.dwg files
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: .dwg files
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
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
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 29 Apr 2009, 21:53
Re: .dwg files
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.
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.
-
- Phoca Newbie
- Posts: 8
- Joined: 29 Apr 2009, 21:53
Re: .dwg files
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.
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.
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: .dwg files
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
administrator\components\com_phocadownload\libraries\phocadownload\file\file.php
method: public static function getMimeTypeIcon
There you can set the extension and its icon.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 29 Apr 2009, 21:53
Re: .dwg files
Thank you, Jan.
I added:
and it worked.
I added:
Code: Select all
case 'dwg':
$icon = 'dwg';
break;
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: .dwg files
Great to hear it.
Jan
Jan
If you find Phoca extensions useful, please support the project