[web2py] Re: component and jquery lightbox

2011-04-07 Thread carlo
as I said, reading the download method code I realized what you are meaning. Never heard of the retrieve method before and you said it is a FAQ: shame on me! As you stated, if not in the FAQ this should definitely go in the Book! Thank you again! carlo On 7 Apr, 14:48, selecta wrote: > i am als

[web2py] Re: component and jquery lightbox

2011-04-07 Thread carlo
after skipping through the download method code I grasped your suggestion! Thank you On 7 Apr, 13:53, carlo wrote: > mmh, thank you Selecta but I think I did not understand that. > Could you point me to one of the past posts? > I do not want to store the original filename in my table, just to get

[web2py] Re: component and jquery lightbox

2011-04-07 Thread selecta
i am also not sure what you exactly mean, but guessing from the fact that you have a table with an upload field the code above would work for that here is a more complete example db.define_table('mytable', Field('myfield','upload')) db.mytable.insert(myfield = db.mytable.myfield.store(open('/etc/

[web2py] Re: component and jquery lightbox

2011-04-07 Thread carlo
mmh, thank you Selecta but I think I did not understand that. Could you point me to one of the past posts? I do not want to store the original filename in my table, just to get the decoded original filename (the one used by the download function to set the disposition header). I do not think your s

[web2py] Re: component and jquery lightbox

2011-04-07 Thread selecta
record = db.mytable[1] filename, file = db.mytable.myfile.retrieve(record.myfile) A('%s'%filename, _href = URL(request.application, 'default', 'download', args = record.myfile)) i read the answer on this mailing list and i provided it to others like 50 times, this should go into the FAQ of web2py