[web2py] Re: Upload file from bash script

2012-12-26 Thread Alfonso Pastor Sierra
Curl is a software (as wget) than you can install in a linux system (for Debian and derivatives): sudo apt-get install curl You can run curl from the bash shell or a shell script. More info: http://curl.haxx.se/docs/faq.html Also you can find a Windows/MSDOS version: http://curl.haxx.se/d

[web2py] Re: Upload file from bash script

2012-12-26 Thread lucas
i am new to curl and after doing a bit of research on it, i think i am more confused. first, this statement is just hanging around. it doesn't seem to be under a function like under "def upload():" > curl -X POST -d @localfilename > http://user:pass@m127.0.0.1:8000/yourapp/default/upload/gi

[web2py] Re: Upload file from bash script

2012-12-26 Thread Massimo Di Pierro
Bash shell. It is not python code. On Wednesday, 26 December 2012 10:23:35 UTC-6, lucas wrote: > > i don't get the above curl statement. it seems to just be floating around > and not under a function or something. so how is it executed? > > also, curl supposedly is native to python 2.6, but i d

[web2py] Re: Upload file from bash script

2012-12-26 Thread lucas
i don't get the above curl statement. it seems to just be floating around and not under a function or something. so how is it executed? also, curl supposedly is native to python 2.6, but i don't have it in any of my pythons. so is curl just part of the linux shell or is it a python function?

[web2py] Re: Upload file from bash script

2012-12-17 Thread Alfonso Pastor Sierra
Works fine, just a comment: curl -POST --data-binary @localfilename to avoid loss of CR / LF in text files Thank you very much. El sábado, 15 de diciembre de 2012 20:20:11 UTC+1, Massimo Di Pierro escribió: > > auth.settings.allow_basic_login = True > db.define_table('test',Field('storedf

[web2py] Re: Upload file from bash script

2012-12-15 Thread Massimo Di Pierro
auth.settings.allow_basic_login = True db.define_table('test',Field('storedfilename','upload')) @auth.requires_login() def upload(): return db.test.insert(storedfilename = db.test.storedfilename.store(request.body, filename=request.args(0)) curl -X POST -d @localfilename http://user:pass@m