Zavy86 / WikiDocs

📗 Just a databaseless markdown flat-file wiki engine
https://www.wikidocs.it
MIT License
270 stars 38 forks source link

Upload different file types as attachments #128

Open paul6294 opened 3 months ago

paul6294 commented 3 months ago

Describe the feature

I know that this is possible, I just cannot locate where to add the file type extensions that will allow them as attachments.
Currently, uploading attachments is restricted to a few file types (pdf, xls ...) please could someone point me to where to make changes so that I may upload others (such as jpg). Thank you!

Is your feature request related to a problem? (optional)

No response

Screenshots (optional)

image

Extra fields

ffiesta commented 3 months ago

Hi @paul6294

If you need to upload other file types you need to edit:

/submit.php  - Line 488 with file type and Line 495 with mimetype
/template.inc.php  - Line 249 with file type
/classes/Document.class.php  - Line 205 with the type.

See: https://github.com/Zavy86/WikiDocs/issues/112

I think in future someone will make a menu to do this.

Zavy86 commented 3 weeks ago

what other files do you think should be included, that we can eventually set them

ffiesta commented 3 weeks ago

Hi @Zavy86,

In my opinion wikidocs can have pre-configured upload files types like it has today, but ... have a menu were we can add more or can select another types.

Like i said in another post i use wiki docs as my personal libray (software, food recipes, snipcode,....) and in case of software folder i have (.iso, .txt, .exe, .md, .pdf, .html, .rar, .... ) multiple files and I think today wikidocs it's some how limited.

As I have little knowledge in PHP programming and as I have some specific needs, currently, because it's more simple edit php files to acomodate my needs!

But because I think this change it's better to all community, I open this issue, however I will try to make this in future. 😄

  1. create a menu to add/edit/select extensions and save to config.inc.php file;
  2. Change php files to load this extensions;
  3. Add custom file with mimetype, to be load by php files.

Sorry for the big answer!