How big is your application/user base? Is sqlite not sufficient? I 
unwittingly thought sqlite was kind of a toy until I did a little more 
research to find out that it is actually very capable and used in a lot of 
applications. Based on this:

https://www.sqlite.org/whentouse.html

Seems like pretty much any application I see myself writing will work well 
in sqlite. 

That being said, the web2py upload field type seems to be very useful, as 
it automagically renames the file and stores it into the upload folder, and 
stores the path to that file in the database. Also, by some more magic, 
when you download the file, it retains the original file name. Pretty neat. 
Read more here:

http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#More-on-uploads

Cheers,
Matt 

On Wednesday, April 5, 2017 at 12:44:47 AM UTC-7, Dave S wrote:
>
> I have a bunch of pix that I want to display, which are not in the uploads 
> directory of the application.  My options appear to be:
>
> - copy them to the static folder (or a subfolder) and have URL() work for 
> them
> - set up streamio on each so I can read them from an arbitrary filesystem 
> location
> - store them as a blob in the database
>
> Is there another option?
>
> If there was just a handful, relatively stable over time, the static 
> option would seem a good idea (because it would be simple to do).  But I 
> took more than 20 shots yesterday (starting with spring hillsides, and then 
> trying to capture birds in flight), and that was just one outing (limited 
> by the memory card). Taking down those pictures before putting up the next 
> set also seems "un-static".
>
> The blob option might be good, but not until I set up a real DB engine 
> (I'm not a DB admin) or use mlabs.  Meanwhile, I'm still on sqlite.
>
> Also, I might want to look into how to cache the images (not because there 
> will be heavy use, but because this might be a good application to use for 
> the learning experience).
>
> Suggestions?
>
> /dps
>
>

-- 
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.

Reply via email to