[web2py] Re: How to allow Image Upload and Border Selection preview before saving to permanent table

2012-09-20 Thread Don_X
Hello Web2py_Superfan, .. i wanted to contact you directly .. but ... I am 
just replying to you on here and hopefully ... you will be able to follow 
up with any pointers !

I have a similar situation ... pertaining to previewing the image before 
committing to the db.table. upload field !! when a user is filling out a 
form  and have the option to upload his picture ! 

I am having serious difficulty adapting various scripts  to web2py ... I 
want the user to be able to preview the image before submitting ..

did you have any success with your endeavour ???  did you end up 
adapting the  Ajax Upload from Zurb playgound to web2py ... ? .. I have 
tried it myself ... with no luck ! ...

This is obviously a javascript question  ... did you succeed ? .. if yes 
... can you share ? .. thank you in advance !!  

I have also checkout this script ffrom this link : 
http://blueimp.github.com/jQuery-File-Upload/

for the preview image capability upon filling out a form before submitting 
... ( this one with jquery is a very full featured one .. too big .. I 
happen not to need a whole bunch of stuff from it ... by isolating what I 
needed the upload, resize  & preview image  but ..

I could not make it work either 

I am still scratching my head with this .. I am looking for a simple 
solution to previewing an image after I resize it to fit ! ... 
I want it to work with all browsers if possible .. offcourse !
the whole thing works .. but I still cannot let the user preview his pic on 
the form before submit !! .. they get to see it only after !! . .and that 
bothers me !!

please advise

Don

-- 





[web2py] Re: How to allow Image Upload and Border Selection preview before saving to permanent table

2012-03-27 Thread mwk
Thanks Bruno,
The css sounds like a good choice and I use that for final display,
trick is I don't know how to get a preview/play around mode first.

Do I need to have one db.tablename for the image preview upload and
then another db.tablename for the final saved version?

Currently I have one db.table for storing the upload image and border
choice id, but i dont know how to get it so they can preview and play
around with borders first before saving it off.

I'm looking at an image preview uploader jquery plugin but I don't
know how to configure it on web2py.  It calls for some server settings
and only shows php sample
Would you mind taking a look and letting me know how to configure it
if you get a chance?

its here:  http://css-tricks.com/ajax-image-uploading/


Thanks a ton.

On Mar 27, 6:18 am, Bruno Rocha  wrote:
> There are many ways of doing that, one option is to overlay the image with
> the border images using CSS background clipping, so you can save the file
> and the ID of the border, so when you show this in view you choose the
> border dynamically.
>
> If you want to save the image with border on disk then you have to take a
> look at the PIL documentation.
>
> Another option is aviary APIhttp://www.aviary.com/web
>
> On Tue, Mar 27, 2012 at 10:04 AM, mwk  wrote:
> > Hi Massimo and All,
>
> > I want a user to be able to upload an image and choose a border to
> > surround it from a choice of images I have in the database.  I want
> > them to be able to play around and see what looks best to them before
> > saving their final border choice and uploaded image to the database.
> > I don't know how to do this.  Can someone please provide some sample
> > code that will get me going?
>
> > Thanks a bunch
> > Web2py_Superfan
>
> --
>
> Bruno Rocha
> [http://rochacbruno.com.br]