The output of type(request.vars.photo) and dir(request.vars.photo). On Monday, February 24, 2014 8:33:44 AM UTC-5, software.ted wrote: > > I am using dhtmlx (www.dhtmlx.com) framework. The component am using is > dhtmlxform. I don't understand what you mean by class and attribute. > On 24 Feb 2014 14:45, "Anthony" <abas...@gmail.com <javascript:>> wrote: > >> Can you provide information about the form processing tool? What is the >> class and attributes of request.vars.photo? >> >> Anthony >> >> On Monday, February 24, 2014 7:36:17 AM UTC-5, software.ted wrote: >>> >>> Am using form processing tool. Which has a send method...what it >>> actually does is make post/get to a url in the >>> form.send("{{=URL('c','a')}}") >>> >>> So what happens in the controller is that I can access the form >>> variables as follows: >>> >>> def a(): >>> file_name = request.vars.file_name >>> >>> The framework has code examples of how to access the uploaded file in >>> php and java >>> >>> Any ideas? >>> On 24 Feb 2014 14:27, "Anthony" <abas...@gmail.com> wrote: >>> >>>> Ajax doesn't allow file uploads in forms. Are you using an Ajax file >>>> upload widget on the client side? >>>> >>>> Anthony >>>> >>>> On Monday, February 24, 2014 2:35:02 AM UTC-5, software.ted wrote: >>>>> >>>>> I am extremely stuck on how to manage uploaded file, I have been >>>>> working with web2py now for over a year and I like its flexibility, I >>>>> have >>>>> been working on an application that is ajax based using my own file. Now >>>>> i >>>>> have the following scenario i need help with: >>>>> >>>>> DB >>>>> ======= >>>>> >>>>> db.create_table("person", Field("first_name"), Field("photo", >>>>> "upload"), ...) >>>>> >>>>> Controller: >>>>> >>>>> def manage_person(): >>>>> try: >>>>> value = db.person.update_or_insert(id == request.vars.id, >>>>> first_name=request.vars.first_name, photo=request.vars.photo, ...) >>>>> except ...: >>>>> >>>>> return value >>>>> >>>>> Now my question is how do i move the upaded image to say the upload >>>>> folder, i was thinking web2py will put the physical image in upload >>>>> folder >>>>> according to documentation but unfortunately folder is empty. The DB >>>>> hower >>>>> gets updated with a the following: C:\fakepath\xxxx.jpg. >>>>> >>>>> Any ideas? >>>>> >>>>> Kind regards, >>>>> >>>>> >>>>> >>>>> -- >>>>> ............................................................ >>>>> ........................... >>>>> Teddy Lubasi Nyambe >>>>> Opensource Zambia >>>>> Lusaka, ZAMBIA >>>>> >>>>> Cell: +260 97 7760473 >>>>> website: http://www.opensource.org.zm >>>>> >>>>> ~/ >>>>> Human Knowledge belongs to the world! - AntiTrust >>>>> >>>>> Man is a tool-using animal. Without tools he is nothing, with tools he >>>>> is all - Thomas Carlyle 1795-1881 >>>>> >>>>> /~ >>>>> >>>> -- >>>> 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+un...@googlegroups.com. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> -- >> 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+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >
-- 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/groups/opt_out.