Wiki: file and image dont upload

Created on 19 Feb 2017  路  9Comments  路  Source: Requarks/wiki

when i try to upload file or image it give an error in red pop up box
"unable to fetch updated listing"
when i try to upload the same file again it say
" {filename} already exist"
but i cant see the file in folder, it is written "folder is empty"
https://www.youtube.com/embed/JPLjwHKpn2U

bug

Most helpful comment

There are many scenarios that cause uploads to fail. Because of the complexity, the upload function will not be changed in 1.x.

A more resilient and capable approach will be used for uploads in 2.0.

All 9 comments

  • If you close the image modal, and open it again, the folder listing is still empty?
  • Do the files exists locally when looking into the wiki.js/repo/uploads folder (using Windows Explorer)?
  • After trying to upload a new image, do you see any error when running the command: pm2 logs from the wiki.js root folder?

1.yes its still empty, i closed wiki.js,MongoD and restarted them, but its still empty.
2.yes all files are in wiki.js/repo/uploads
3.On start, it gives error "Can't connect to github.com/ExampleName/ExapmleRepo" and other GitHub errors.
After watching this ,i changed the URL in the configuration file but settings are not getting updated and it was still showing example url in pm2 error log instead of new github url.

one more thing.If i write git: false in configuration file, node.js don't launch when i start wiki.js.When i remove that line , it become normal.

New git settings are not applied once the repo folder is created. The solution is to stop Wiki.js, delete the repo folder and start Wiki.js again. The repo folder will then be created with the new Git settings.

I'll take a look at the git: false bug you encounter, this is not supposed to behave this way.

git: false bug duplicate of #14

@NGPixel , did you ever solve the original issue of uploads failing?

There are many scenarios that cause uploads to fail. Because of the complexity, the upload function will not be changed in 1.x.

A more resilient and capable approach will be used for uploads in 2.0.

2019 here, obscure error messages and no file upload.

After all these days I finally figure out what was happened with this issue.
The conclusion, it's all about the process. If the wiki's init job start correctly...
I'll give you guys some check list to find out which step goes wrong:

  • [ ] git:

    • remote git repo is ok

    • user of this git repo has write permission

    • init the repo with a master branch(also you need to deal with the old repo in the right way I'll give details of this situation later)

  • [ ] agent.js job

    • resync() //make sure resync() return resolve(that's why you need check all point in git)

    • readdirAsync() // just ok

    • initialScan() // this is the most important step(make sure it init successfully then it will start upl.watch() )

But to make sure every step doing its own way and return resolve() is not that easy, so many accident will disrupt it.

you can use repo.lock and scan.lock file to make sure agent -> job() start correctly, also init the empty git repo automatically(implement in resync().catch), you can even add a new page to show the synchronizing..., if you want(this section is not fit for all of you, but you need to fix the problems to get it(agent -> job()) started)


I haven't check the new release 2.x, cause I'm using 1.x
If the new version has fixed this, you can ignore this comment.
Thanks for the author NGPixel, great work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ccolella-mdc picture ccolella-mdc  路  3Comments

touhoku-japan picture touhoku-japan  路  3Comments

ghost picture ghost  路  3Comments

ccolella-mdc picture ccolella-mdc  路  3Comments

leandro-hermes picture leandro-hermes  路  4Comments