Author Topic: How do you enable file uploads?  (Read 1786 times)

Offline Kuroishinzo

  • User
  • *
  • Posts: 7
    • View Profile
How do you enable file uploads?
« on: February 07, 2010, 07:00:57 PM »
Hello,
I am using Knowledgeroot 0.9.9.5 with FCKeditor 2.6.5 and I am trying to figure out how I can enable file Uploads from the fckeditor toolbar. I want the users to be able to upload .PDFs, .XLSs, .PPTs, etc without them having to ask the admin to upload the files manually. The upload image and upload flash options work fine but I don't have the option to upload anything else. It looks like the file browser in fckeditor has this option (as well as media) coded into it but I can't seem to figure out what I need to enable in order to make it work. I would be willing to use a different extension too if I have to, as long as I can retain the options I already have in fckeditor. Can anyone help me out?

Thank you.
« Last Edit: February 07, 2010, 09:22:04 PM by Kuroishinzo »

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: How do you enable file uploads?
« Reply #1 on: February 07, 2010, 09:35:17 PM »
Why do you want to upload pdfs xls or other non picture of flashfiles to fckeditor?
You could modify the config of upload in fckeditor in:
extension/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php

regards,
Frank

Offline Kuroishinzo

  • User
  • *
  • Posts: 7
    • View Profile
Re: How do you enable file uploads?
« Reply #2 on: February 07, 2010, 10:04:55 PM »
In addition to the generic needs of a knowledge base, I need multiple users to be able to access and upload documents (like reports that are automatically exported to excel and original versions of other documents) to knowledge base articles.

We want to use knowledgeroot because the root structure makes it much easier to organize information and the search feature makes it easier to locate information if you don't know where it is stored. It also allows us to put in article numbers, keywords and things like that.

the config.php already has

$Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;

and

$Config['AllowedExtensions']['File']   = array('7z','aiff','asf','avi','bmp','csv','doc','fla','flv','gif','gz','gzip','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','ods','odt','pdf','png','ppt','pxd','qt','ram','rar','rm','rmi','rmvb','rtf','sdc','sitd','swf','sxc','sxw','tar','tgz','tif','tiff','txt','vsd','wav','wma','wmv','xls','xml','zip') ;
$Config['DeniedExtensions']['File']      = array() ;
$Config['FileTypesPath']['File']      = $Config['UserFilesPath'] . 'file/' ;
$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;
$Config['QuickUploadPath']['File']      = $Config['UserFilesPath'] ;
$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;

is there something else that I must change?


P.S. I am not a PHP or Java guru by any means so it is entirely possible for it to be something extremely simple
« Last Edit: February 07, 2010, 10:08:38 PM by Kuroishinzo »

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: How do you enable file uploads?
« Reply #3 on: February 07, 2010, 10:07:32 PM »
Hi,

you could modify:
$Config['AllowedExtensions']['File']
to your needs!

You could upload to each created content in knowledgeroot files. You could use that?!

Frank

Offline Kuroishinzo

  • User
  • *
  • Posts: 7
    • View Profile
Re: How do you enable file uploads?
« Reply #4 on: February 07, 2010, 10:11:10 PM »
What would  I change it to? How do I add the button to the tool bar?

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: How do you enable file uploads?
« Reply #5 on: February 08, 2010, 10:22:39 AM »
Hi,

i think you misunderstand the goal of fckeditor.
With fckeditor you could work like word or any other office program. In this program you can attach images or other multimedia stuff but no real files!
What you want is the fileupload in knowledgeroot itself.
So create a content. After that you could attach files to content on the bottom of a text!

regards,
Frank

Offline Kuroishinzo

  • User
  • *
  • Posts: 7
    • View Profile
Re: How do you enable file uploads?
« Reply #6 on: February 08, 2010, 06:07:35 PM »
What I need is a quick and easy way to upload and attach a file to the content. An additional button within FCKEditor would be preferred. However, it is okay if I have to use an additional extension to do that. Either way, I don't know how to write the code for it, what files to edit or what to change in those files. Please help.

Example:

For example, if this were content, you would enter your text just like a word editor. Then, you would click a button at the top to upload a file (just like if you were going to attach an image). Select the file you want to uplaod. The file is then put into the uploads/files folder. A link is then placed in the content. After the content is published, users can click on the link within the published content so that they could download or view the file. It would look something like the link I am creating below (using html to illustrate).

Click below to download previous audits in XLS format

  • <a href="//Knowledgeroot/uploads/files/Example_Document1.XLS">Example_Document1
  • <a href="//Knowledgeroot/uploads/files/Example_Document2.XLS">Example_Document2
  • <a href="//Knowledgeroot/uploads/files/Example_Document3.XLS">Example_Document3
  • <a href="//Knowledgeroot/uploads/files/Example_Document4.XLS">Example_Document4

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: How do you enable file uploads?
« Reply #7 on: February 08, 2010, 08:03:37 PM »
Hi,

this is so not possible at the moment.
If you want this feature you must write a plugin or change a plugin in fckeditor.
For that check this pages:
http://ckeditor.com/
http://dev.fckeditor.net/

Frank

Offline Kuroishinzo

  • User
  • *
  • Posts: 7
    • View Profile
Re: How do you enable file uploads?
« Reply #8 on: February 08, 2010, 08:58:54 PM »
Frank,

First of all, I am so sorry to have wasted your time. I did not know, at all, that there was an option to upload a file already built into Knowledgeroot. I had created roots and sub-roots and was frustrated when I did not see an option to upload a file while I was creating content. I closed without saving and began researching how to get this functionality. It wasn't until just now that I created content and went to make edits that I noticed this button...
(attached image). This will work for now and I will use the dev links you provided to make an attempt at adding the functionality to the editor to streamline the process.

Thank you!
« Last Edit: February 08, 2010, 09:14:22 PM by Kuroishinzo »

Offline Kuroishinzo

  • User
  • *
  • Posts: 7
    • View Profile
Re: How do you enable file uploads?
« Reply #9 on: February 08, 2010, 11:29:30 PM »
After attempting to use this new found feature, I am getting the following error:
"The requested URL /knowledge_base/download/3/Full_Site_List.xls was not found on this server."

I looked in the directory and it doesn't appear to be creating any folders or uploading any files (made 3 attempts).

Is there an attribute some where that I need to change?

The file that I am trying to upload is only 65KB

*Edit* I figured out the problem. My work computer auto uploads everything in my "My Documents" folder to a server so as to prevent loss of data should the computer fail. When I upload a file, it isn't pulling the actual file down but rather the shortcut to the server where it is housed.
« Last Edit: February 08, 2010, 11:32:56 PM by Kuroishinzo »

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: How do you enable file uploads?
« Reply #10 on: February 09, 2010, 09:08:44 AM »
Hi,

i think you enable static file download so that each link shows a static link instead of a dynamic link.
You could disable static file download in the admin interface or you must enable apache rewrite to make the static file download working.

Frank

Offline Kuroishinzo

  • User
  • *
  • Posts: 7
    • View Profile
Re: How do you enable file uploads?
« Reply #11 on: February 10, 2010, 08:43:07 PM »
Just a heads up to anyone who might be looking for the same thing I was.

The option does exist, you must click the "Insert/Edit hyperlink" button. Then you can browse your server, upload a file to it and create a link for it!

Attached are screen shot examples