[dokuwiki] Re: Can't upload files anymore

Instead of commenting out the file type check, I'd rather get back to the
original code so that I can control what gets uploaded via mime.conf. Where
did you hide the original? Or is it just gone?

Regards,

Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

www.the-infoshop.com
www.giiexpress.com
www.etudes-marche.com

>-----Original Message-----
>From: dokuwiki-bounce@xxxxxxxxxxxxx [mailto:dokuwiki-
>bounce@xxxxxxxxxxxxx] On Behalf Of Myron Turner
>Sent: Thursday, July 10, 2008 1:55 PM
>To: dokuwiki@xxxxxxxxxxxxx
>Subject: [dokuwiki] Re: Can't upload files anymore
>
>Jerry Schwartz wrote:
>> My JavaScript isn't the best, and my knowledge of Dokuwiki's innards
>is
>> non-existent, but I found this in the source of the media manager
>screen:
>>
>>       function G_onsubmithandler() {
>>           var filename =
>document.getElementById('upload__name').value;
>>            if(!filename){
>>          alert("Please enter a file for uploading");
>>          return false;
>>         }
>>            elems = filename.split(/\./);
>>            ext = elems.pop();
>>            if(!ext.match(/(jpeg|jpg|png|gif|bmp)/)) {
>>               alert('filetype not supported: ' + ext);
>>               return false;
>>            }
>>          setupFCK(document.getElementById('media__manager'));
>>             return true;
>>       }
>>
>> Won't that prevent any file types but jpeg, jpg, png, gif, and bmp
>from
>> being accepted? I don't see where this code allows for reading
>mime.conf (no
>>
>You are using the media manager supplied by DokuWikiFCK, which restricts
>uploads to images.  Just add the extension you want to permit for upload
>to the list of file types.  For instance:
>
>                   jpeg|jpg|png|gif|bmp|txt|gz
>
>
>Or if you want to allow any type of file to be uploaded,  delete the
>following:
>
>          elems = filename.split(/\./);
>           ext = elems.pop();
>           if(!ext.match(/(jpeg|jpg|png|gif|bmp)/)) {
>              alert('filetype not supported: ' + ext);
>              return false;
>           }
>
>Or comment it out by placing it between comments markers as follows:
>
>             /*
>
>           elems = filename.split(/\./);
>           ext = elems.pop();
>           if(!ext.match(/(jpeg|jpg|png|gif|bmp)/)) {
>              alert('filetype not supported: ' + ext);
>              return false;
>           }
>
>              */
>
>I'll look at this in the next release of DokuWikiFCK.
>
>Thanks for bringing it to my attention,
>
>Myron
>
>--
>
>_____________________
>Myron Turner
>http://www.mturner.org
>http://net18reaching.org/cityscapes
>
>
>
>
>--
>DokuWiki mailing list - more info at
>http://wiki.splitbrain.org/wiki:mailinglist



-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: