Hi Vidul, No, I did not use FTP - at least not explicitly. I don't know what protocol web2py uses behind the scenes to upload files.
I was following the instructions from the FAQ on web2py.com to turn an HTML page into a blog. I used the feature from the "Static files" section of the design page (at "http://127.0.0.1:8000/admin/default/ design/MyBlog") to upload a file. The source file was a jpeg image from my C: drive and web2py was running from a USB memory stick mounted as my E: drive. I've tried several different image files, both .jpg and .gif. Each one has been corrupted, so it looks like there is either a bug in web2py's code for uploading binary files OR I've made some unintentional error that I have yet to fathom. It seems like such a basic part of web2py, that either I've setup something wrong, or many others would have seen this problem. I'd really like this to work, because web2py is just too cool for words. Regards, Doug C. On Mar 27, 12:22 pm, Vidul Petrov <vidul.r...@gmail.com> wrote: > Hi Doug, > > Did you by any chance make the upload using FTP? > My guess is that binary mode is not used, because I am pretty sure > that WEB2PY has nothing to do with this problem. > > On Mar 27, 5:21 pm, Doug Cuthbertson <doug.cuthbert...@gmail.com> > wrote: > > > Has anyone else had this problem (uploading images)? Are there any > > debug settings for web2py or log files it can generate to help > > determine what's going wrong? If someone can point me in the right > > direction, I'll be happy to try to analyze/debug my installation. > > > Thanks, > > Doug C. > > > On Mar 26, 5:41 am, Doug Cuthbertson <doug.cuthbert...@gmail.com> > > wrote: > > > > I've tested Firefox 3.0.7 and IE 7.0. > > > > Regards, > > > Doug C. > > > > On Mar 25, 10:38 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > Which browser? Have you tried more than one? > > > > > Massimo > > > > > On Mar 25, 3:22 pm, Doug Cuthbertson <doug.cuthbert...@gmail.com> > > > > wrote: > > > > > > Massimo, > > > > > Yes, I'm uploading from the admin/default/design/TestBlog page. Here's > > > > > what I've tried: > > > > > > web2py: versions 1.58 and 1.59 binary and I even downloaded the source > > > > > from SVN this afternoon and ran from that with no difference. > > > > > > OS: Windows XP SP3 Home Edition, and W2K3 SP2. > > > > > > I normally run from binary on a USB memory stick. Just for fun, I > > > > > tried source on both the memory stick and from the hard drive on the > > > > > W2K3 system (Python 2.5.4), with no improvement. > > > > > > In all cases, I used the default web server (CherryPy, right?) > > > > > onhttp://localhost:8000. > > > > > > Regards, > > > > > Doug C. > > > > > > On Mar 25, 3:31 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > > > From your email I assume you are uploading the images via the admin/ > > > > > > design page. > > > > > > > Which version of web2py are you running? Which OS? binary or source? > > > > > > Which web server? > > > > > > > Massimo > > > > > > > On Mar 25, 10:20 am, Doug Cuthbertson <doug.cuthbert...@gmail.com> > > > > > > wrote: > > > > > > > > Massimo, > > > > > > > Thanks for the reply. When I > > > > > > > accesshttp://localhost:8000/TestBlog/static/image2.jpg > > > > > > > I get an image of the text "http://localhost:8000/TestBlog/static/ > > > > > > > image2.jpg". When I try other images I either get a corrupted > > > > > > > version > > > > > > > of the original image, or I get an image of the URL text. When I > > > > > > > open > > > > > > > the directory "E:\web2py\applications\TestBlog\static", the images > > > > > > > (image1.jpg and image2.jpg in this case) are there, but either > > > > > > > they > > > > > > > cannot be displayed in an image viewer or they are displayed as a > > > > > > > corrupted version of the original. > > > > > > > > Regards, > > > > > > > Doug C. > > > > > > > > On Mar 25, 10:17 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > > > > > Can you access > > > > > > > > >http://localhost:8000/TestBlog/static/image2.jpg > > > > > > > > > is it either a typo or the image is not there. > > > > > > > > > Massimo > > > > > > > > > On Mar 25, 6:24 am, Doug Cuthbertson > > > > > > > > <doug.cuthbert...@gmail.com> > > > > > > > > wrote: > > > > > > > > > > Hi Folks, > > > > > > > > > I'm new to web2py. I've worked through the recipe example in > > > > > > > > > the > > > > > > > > > cookbook and it worked like a champ! I really like being able > > > > > > > > > to > > > > > > > > > create all the parts of a web application via the browser. It > > > > > > > > > means > > > > > > > > > never having to open a console on the web server. Very nice. > > > > > > > > > > Next, I tried following the instructions in "how to turn a > > > > > > > > > static html > > > > > > > > > page into a blog in 90 seconds" from the FAQ. All was going > > > > > > > > > well, > > > > > > > > > except that the image didn't display on the > > > > > > > > > /TestBlog/default/hello > > > > > > > > > web page. I've tried both versions 1.58 and 1.59 of web2py. > > > > > > > > > Here's > > > > > > > > > what the source view looks like from Firefox (Ctrl-U): > > > > > > > > > > <html> > > > > > > > > > <head> > > > > > > > > > <title> Welcome to My Blog </title> > > > > > > > > > </head> > > > > > > > > > > <body> > > > > > > > > > <img src="/TestBlog/static/image2.jpg"/> > > > > > > > > > Please say something here! > > > > > > > > > </body> > > > > > > > > > </html> > > > > > > > > > > I uploaded a couple of images, so this shows the last attempt > > > > > > > > > with > > > > > > > > > "image2.jpg" as the src attribute. > > > > > > > > > > Has anyone seen this kind of behavior before? > > > > > > > > > > Thank you for any and all advice. > > > > > > > > > > Regards, > > > > > > > > > Doug C. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---