Author Topic: New file types  (Read 3780 times)

Gnominator

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
New file types
« on: September 17, 2010, 11:12:33 pm »
Not sure that I'm posting this in right subforum.
I'm writing an extension for latest FengOffice that will add new file type, "archive".
These "archives" are regular documents, except they are saved to file system (good for large files like gzipped back-ups), not to database, and the weblink is created to the uploaded file.

The problem is, that I can not get both document and "archive" to upload.
I looked in '/public/assets/javascript/og/modules/addFileForm.js' and found a function that does file upload (or does not, if the file is a weblink).
So I modified the if...else construction by adding two exact statements: type == '0', for document, and type == '2', for newly added archive.
Now, if I use this new statement, the archive gets uploaded, and if I try to upload document, nothing happens when I click "Upload file" button.

What am I doing wrong? ???