Hi there!
I’ve been playing with NC for about a month - loving it so far! Great work guys!
One of the interesting options for me was to use NC for my document-management solution. However, I couldn’t find any apps which enable me to scan files directly into NC. I could, of course, scan them locally and then upload, but this is a clunky solution
So, I decided to get my hands dirty, and write an app for this function. I’m happy to introduce you to Scanner v0.0.2. Source is at https://gitlab.com/gwmngilfen/nextcloud-scanner/tree/master
The functionality is pretty simple - it adds a new entry to the New File Menu, which when clicked acquires a scan (via SANE’s cmdline scanimage) and puts the image content in the file. See the README screenshots for more details.
However, I’m totally new to PHP, and pretty terrible at Javascript, so this app has been duct-taped together using the app tutorial and ideas/code from other peoples apps. As such, it’s working for me, but:
(a) there’s definitely stuff that’s broken (see Known Issues in the repo)
(b) there’s probably stuff that’s wrong / insecure
© there’s no tests (yet!)
(By the way, it’s a massive credit to your app docs that I got this far. Figuring out the way to wire up the file storage stuff was fun )
I’d really like to make this a decent quality app, but as stated, I know zero PHP - so all suggestions for how to improve the code are welcome. Right now I’d love to have a spinner while the scan is in progress, and to have the file view properly refresh when the scan is complete. I’ll also be looking at adding tests in the short term. After that, I’ll release it to the app store, if it’s useful to others.
Thanks for reading, and thanks in advance for any help!
Greg