Web2py has an 'upload' field type that helps you manage file uploads. "Upload" is a little bit of a misnomer because you can select the file path to store the file (or an existing path) and the blob is not stored in the database.
You can read more here: http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=upload#SQLFORM-and-uploads There are several good Bootstrap and Jquery plugins that you can use to view a "lightbox" type of layout of your scanned images with the ability to zoom on an image rather than download and then open the file which I think would be best for your archival type of solution. Here's just one example: http://www.bootply.com/71401 There are many discussions on the web2py upload feature in this forum and some 'slices' that you may find helpful such as: http://www.web2pyslices.com/slice/show/1504/manual-uploads Hope that helps. Mike On Wednesday, August 20, 2014 4:03:39 PM UTC-4, Gary Cowell wrote: > > Hi > > I'm writing a web app for my home server to allow me to scan and store > images of official correspondence, so I can shred the paper and recycle it. > A document archive. > > I have the scanner components written [using pyinsane] > > I have an idea of the models required, tables to hold the sender, date, > page number, header ref, header date, received date etc. > > What I want to know is how best to handle the scanning and image storing. > > I don't really [I don't think] want to store the images in the database, > be that sqlite or pgsql [or do I?] > > At the moment my python scanner scans the image, and stores it in a > directory which is a NFS mount on my NAS. > > My web2py application would have to read this image and present it for > confirmation, checking before storing the index entry, and the path to the > image into the database. > > So, firstly, how best to present the scanned image to the user for > acceptance, can I do this from an arbitrary location [guessing not], I do > have a PIL image in memory, so can I present that in web2py, if I can't > link an IMG= to the arbitrary disk location > > Sorry if my questions sound vague, I'm just getting to grips with web2py [ > used it a whole 3 days! ] > > Thanks for any pointers. Including NO! YOU FOOL! DON'T DO IT! > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.