GM-Script-Writer-62850 / PHP-Scanner-Server

Allows you to use your Linux install as a web based scanner server thus allowing you to scan with any web enabled device; Now supports server side printing! (As of 1.4.11)
59 stars 17 forks source link

Temp folder change #27

Open Romancze opened 8 years ago

Romancze commented 8 years ago

Hi, please I need to create scanned folder. For example I want use shared folder (/home/pi/ shared/) for all users access. I dont want download photos from web page. I want press scan and find image on network. So how? Thank you

GM-Script-Writer-62850 commented 8 years ago

i assume you don't want the preview images included but if you did you could just symlink or bind the scans folder to the desired location (id recommend bind) to bind that drop this into your /etc/fstab /home/pi/shared /home/www-data/php-scanner/scans bind defaults,bind 0 0 ill try to make a patch file to make it not include preview images make sure www-data has write access to the new location

edit: actually i will just add a optional feature set from config.ini

GM-Script-Writer-62850 commented 8 years ago

i have made a change to my local version to separate the preview images from the scans https://www.mediafire.com/?f71l7782ud417ds (consider this unstable/needs testing) when you 1st load the web UI your scans will be separated into a thumb and file folder you can then bind your scan/file folder to your share if you need to revert to the older version just move the contents of the new sub folders back to there parent and roll back to the current version assuming i did not miss any spots it should be ready to go (there were a lot of lines to change due to moved images) edit: updated link edit missed line 333 of res/main.js new line 333: previewIMG.src='scans/thumb/'+data.preview;

GM-Script-Writer-62850 commented 8 years ago

i hope you are not planning to manage the files from your net share it was not designed to work that way, the preview images are assumed to have a matching scan and vice versa no if you write a script to check for scans of previews and delete scans without a matching preview via a cron task that would work you still can't rename them though

Romancze commented 8 years ago

Thank you for fast reply and help. I'll try it soon. I just wanted press button, open shared foder and manage picture. So thank you for information

GM-Script-Writer-62850 commented 8 years ago

if you plan on renaming it would be best to have a script that copies scans to the share instead of sharing the scans a simple cron script can do that, just make it so it only copies files made since the last time it was ran

GM-Script-Writer-62850 commented 8 years ago

how are you planning to use the share, are multiple users getting read/write access? or is it read only i found several points of breakage i missed https://www.mediafire.com/?dshgs1doobzau7f are you using the web UI for anything other than scanning? if not you could edit the cleaner script to copy scans to the share and delete them from the server for example if you set the max age to 0 and had cron run it every 60 seconds and put the between lines 16 and 17 copy("$loc/".$lst[$i], '/path/to/share/'); it would essentially move your scans to the share seconds after they are made just to avoid possible issues i would set the max age to 5 just to be safe