[web2py] Re: Upload images to folder outside web2py

2020-11-09 Thread 'Annet' via web2py-users
Thanks for the link. I had a look at Gael's post, my problem isn't related to that one. However, reading Gael's post I realised that bewteen versions I introduced conditional models. Since the download function is in the default controller and the uploadfolder is set in the model I needed to add

[web2py] Re: Upload images to folder outside web2py

2020-11-07 Thread Dave S
On Monday, November 2, 2020 at 7:35:45 AM UTC-8, Annet wrote: > > I forgot to say, uploading an image works, if the folder isn't > there it is being created, otherwise the image is uploaded > to the folder. > > Best, > > Annet > > Is this related to slashes being dropped, as in Gael's question? h

[web2py] Re: Upload images to folder outside web2py

2020-11-02 Thread 'Annet' via web2py-users
I forgot to say, uploading an image works, if the folder isn't there it is being created, otherwise the image is uploaded to the folder. Best, Annet Op maandag 2 november 2020 om 16:17:48 UTC+1 schreef Annet: > > To upload images to separate folders outside web2py I set the upload > folder wit

[web2py] Re: upload - can I get the path to original file

2019-10-08 Thread 'jim kaubisch' via web2py-users
On Friday, October 4, 2019 at 12:07:06 PM UTC-7, jim kaubisch wrote: > > Hi > > In a file upload, I want to store both the original filename AND the path > to the original file (to cover the case of files with the same name but > from different folders) > I'm successfully getting the filename f

[web2py] Re: upload - can I get the path to original file

2019-10-07 Thread Dave S
On Friday, October 4, 2019 at 12:07:06 PM UTC-7, jim kaubisch wrote: > > Hi > > In a file upload, I want to store both the original filename AND the path > to the original file (to cover the case of files with the same name but > from different folders) > I'm successfully getting the filename f

[web2py] Re: upload - can I get the path to original file

2019-10-04 Thread Paco Bernal
HI db.define_table('logos', > Field('logo', 'upload', uploadfolder='applications/%s/%s' % > (request.application, 'uploads'), uploadseparate=True, autodelete=True), > Field('thumbnail', 'upload', uploadfolder='applications/%s/%s' % > (request.application, 'uploads'), uploadseparate=True, autod

[web2py] Re: Upload files

2019-06-22 Thread Alex Beskopilny
if any ( ['.jpg' in file_name, '.JPG' in file_name , ] ): ? суббота, 22 июня 2019 г., 11:18:42 UTC+3 пользователь Константин Комков написал: > > I made upload form for files that winter and today when project is working > 3 days user told me that he can't load file. When I saw that file it

[web2py] Re: Upload hangs when submit is hit

2019-01-07 Thread Anthony
Hard to say without seeing all the code. What are you expecting to do with the uploaded file? Note, using SQLFORM.factory for file uploads can be tricky, as the file is saved with a new filename, which you may then not be recording anywhere if nothing is saved to a database. You must also expli

[web2py] Re: Upload - need help

2019-01-07 Thread Anthony
On Monday, January 7, 2019 at 8:14:39 AM UTC-5, Weronika Swiechowicz wrote: > > Hi. I am trying to allow the user to upload files using UI. If I cannot > search their filesystem the user will have to upload documents on the > machine where the server is run. That is not very helpful if UI is acce

[web2py] Re: Upload - need help

2019-01-07 Thread Val K
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory -- 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 messag

[web2py] Re: Upload - need help

2019-01-07 Thread Val K
https://developer.mozilla.org/en-US/docs/Web/API/File_and_Directory_Entries_API -- 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

[web2py] Re: Upload hangs when submit is hit

2019-01-07 Thread wswiecho
To add more to this post. I truly only need the path to the file not the file itself. On Monday, January 7, 2019 at 8:31:59 AM UTC-5, wswi...@hawk.iit.edu wrote: > > Good morning, > > I have had problems with the buildin upload functionality of the > SQLFORM.factory(). > > When I use code in s4

[web2py] Re: Upload - need help

2019-01-07 Thread Weronika Swiechowicz
Hi. I am trying to allow the user to upload files using UI. If I cannot search their filesystem the user will have to upload documents on the machine where the server is run. That is not very helpful if UI is accessed remotely. On Sunday, January 6, 2019 at 9:26:13 AM UTC-5, Anthony wrote: > >

[web2py] Re: Upload - need help

2019-01-06 Thread Anthony
The Python code is run on the server, so you cannot use it to check the filesystem on the end user's computer. Further, for security reasons, the browser will not allow you to directly read/access the user's filesystem. What are you trying to do? Anthony On Saturday, January 5, 2019 at 1:16:37

Re: [web2py] Re: Upload CSV file though app admin getting an error in 2.17.2

2019-01-01 Thread Donald McClymont
There is an open issue #2015 about this and some proposed changes that get it working on python 3 - however would like some confirmation that this is the best way to fix it. https://github.com/web2py/web2py/issues/2015 Donald -- Resources: - http://web2py.com - http://web2py.com/book (Documen

Re: [web2py] Re: Upload CSV file though app admin getting an error in 2.17.2

2018-12-31 Thread sandeep patel
Please Refer attached image. Seeing a flash message from web2py unable to parse CSV. iterator should return strings, not bytes (did you open the file in text mode?) Thanks On Tue, Jan 1, 2019 at 12:39 PM Dave S wrote: > On Monday, December 31, 2018 at 10:17:38 PM UTC-8, sandeep patel wrote:

[web2py] Re: Upload CSV file though app admin getting an error in 2.17.2

2018-12-31 Thread Dave S
On Monday, December 31, 2018 at 10:17:38 PM UTC-8, sandeep patel wrote: > > Hello All, > I am getting an error while uploading a CSV file to table though app > admin. > > [image: error.PNG] > > > I am using python3.6 and web2py 2.17.2. > > Thanks > SP > What is the error? CSV uploads don't aut

Re: [web2py] Re: upload a photo to your site by >

2018-12-07 Thread Dave S
On Friday, December 7, 2018 at 4:35:53 AM UTC-8, Morteza Tabibi wrote: > > Hi, my friend, I'm having this problem. I want to, for example, take a > picture of a flower on my site and explain about it. What should I do? > Thank you for saying, for example. > > Are you wanting to make a page that

Re: [web2py] Re: upload a photo to your site by >

2018-12-07 Thread Morteza Tabibi
Hi, my friend, I'm having this problem. I want to, for example, take a picture of a flower on my site and explain about it. What should I do? Thank you for saying, for example. On Fri, Dec 7, 2018 at 1:29 PM 黄祥 wrote: > perhaps you can show the code and the traceback error > ref: > http://web2py

Re: [web2py] Re: upload a photo to your site by >

2018-12-07 Thread Christian Varas
As Stifan says, please show us the code. If you follow the example in the book, image upload works perfect. About ">" what are you trying to do with this? Cheers. Chris. El vie., 7 dic. 2018 6:59 a. m., 黄祥 escribió: > perhaps you can show the code and the traceback error > ref: > http://web2p

[web2py] Re: upload a photo to your site by >

2018-12-07 Thread 黄祥
perhaps you can show the code and the traceback error ref: http://web2py.com/books/default/chapter/29/03/overview#An-image-blog best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.co

[web2py] Re: Upload an image from front-end

2018-02-06 Thread Πέτρος Χατζηλάμπρος
So, I did the following: - I created a controller and I put the following code inside # Example of a form that sends a valid POST request to changeAvatar() @auth.requires_login() def showChangeAvatarForm(): return locals() # use /showChangeAvatarForm from browser for testing @auth.require

[web2py] Re: Upload complete, but with error

2017-09-22 Thread Dave S
Current status in the other thread: https://groups.google.com/d/msg/web2py/dTK5lxWBsIA/3sIYnwMsBwAJ> /dps On Thursday, December 15, 2016 at 2:18:42 PM UTC-8, Dave S wrote: > > > > On Thursday, December 15, 2016 at 2:11:57 PM UTC-8, Dave S wrote: >> >> When uploading a file from one of our Window

[web2py] Re: Upload to auth_user

2017-09-02 Thread Tiago Barrionuevo
Well... I created a test application from scratch, added the auth_user.picture and it works fine! I'm going to try to find out what's going wrong with my application admin! I already run through the debugger and didn't discover nothing... When I find out the problem I'll post here! -- Resource

[web2py] Re: upload an excel sheet to be added to the system

2017-07-26 Thread Anthony
Note, if you have a new question, it is better to simply create a new topic rather than adding to a thread that is several years old. On Wednesday, July 26, 2017 at 5:30:11 AM UTC-4, kesh wrote: > > how can i import excel row into a web2py sqlite table > > On Wednesday, 2 February 2011 16:30:26 U

[web2py] Re: upload an excel sheet to be added to the system

2017-07-26 Thread Dave S
On Wednesday, July 26, 2017 at 2:30:11 AM UTC-7, kesh wrote: > > how can i import excel row into a web2py sqlite table > > If the excel data is in CSV format, you can import that directly. http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Exporting-and-importing-data>

[web2py] Re: upload an excel sheet to be added to the system

2017-07-26 Thread kesh
how can i import excel row into a web2py sqlite table On Wednesday, 2 February 2011 16:30:26 UTC+3, Neveen Adel wrote: > > Hello, > > Is there a library that can be used to import an excel file that > insert records in a specific table ? > > If there is no a library how can i do that ? > > T

[web2py] Re: upload and download, in order to manage attached files

2017-05-18 Thread Dave S
On Thursday, May 18, 2017 at 8:42:40 AM UTC-7, J-Michel Angers wrote: > > One step more :-) > Without changing the above code, it's working now. > The change I've written ==> in the DAL, I had "db_codec='latin1' ". I > just removed it for another reason, and it works now. > ... And I understa

[web2py] Re: upload and download, in order to manage attached files

2017-05-18 Thread J-Michel Angers
One step more :-) Without changing the above code, it's working now. The change I've written ==> in the DAL, I had "db_codec='latin1' ". I just removed it for another reason, and it works now. ... And I understand now the link /default/download/ : it's / controlleur="default" / function="down

[web2py] Re: upload and download, in order to manage attached files

2017-05-18 Thread J-Michel Angers
Thank you Dave for your advices ! You're right, I didn't look at the "download" function, and I didn't change it. I've done this now : (1) I've removed the "auth" condition, and I change the db to dbW = the database for my app I also change the line in the view. New version of download : def do

[web2py] Re: upload and download, in order to manage attached files

2017-05-17 Thread Dave S
On Wednesday, May 17, 2017 at 9:57:50 AM UTC-7, J-Michel Angers wrote: > > Hi, > I'm building an app to fill "PurchaseRequest", to valid it by the staff, > and then type a "PurchaseOrder". Exactly like with a paper form that we > fill, and get signatures to valid it. > Now the main boby of the

[web2py] Re: upload image and save in dinamic directory profile

2017-04-28 Thread Dave S
On Friday, April 28, 2017 at 11:52:53 AM UTC-7, felipe...@tksolucoes.com.br wrote: > > hi, > > I want save one image in dinamic directory web2py, but ai not using > SQLFORM, > > When i do upload the image i recieve in controller C:/FAKEPATH/imagename > > how do i handle this path or other upl

[web2py] Re: Upload image and send by email

2017-03-28 Thread 黄祥
perhaps you can combine upload and mail.send ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#More-on-uploads http://web2py.com/books/default/chapter/29/08/emails-and-sms#Attachments best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Upload complete, but with error

2016-12-15 Thread Dave S
On Thursday, December 15, 2016 at 2:11:57 PM UTC-8, Dave S wrote: > > When uploading a file from one of our Windows clients, we sometimes find > this in the web2py.log file: > > [...] > > File "/home/ec2-user/web2py/web2py-2.14.6/gluon/rocket.py", line 1766, > in write > self.send_headers

[web2py] Re: Upload files folder setup

2016-09-25 Thread Anthony
And note, this is covered here: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor On Saturday, September 24, 2016 at 11:24:21 PM UTC-4, Massimo Di Pierro wrote: > > Field('name', 'upload', uploadfolder=..., uploadfs=...) > > uploadfolder lets you spec

[web2py] Re: Upload files folder setup

2016-09-24 Thread Massimo Di Pierro
Field('name', 'upload', uploadfolder=..., uploadfs=...) uploadfolder lets you specify a folder uploadfs lets you specify another file system (from pyfilesystem) like S2, FTP mounted, etc. massimo On Friday, 23 September 2016 19:46:03 UTC-5, SR wrote: > > > When we upload a file via an upload f

[web2py] Re: upload field and IS_IMAGE

2016-08-19 Thread Kirill Shatalaev
пятница, 19 августа 2016 г., 3:48:12 UTC+4 пользователь 黄祥 написал: > > pls try : > requires = IS_EMPTY_OR([IS_LENGTH(16384), IS_IMAGE() ] ) > > best regards, > stifan > Man, thanks!!! I completely forgot about this validator. Need to sleep more... -- Resources: - http://web2py.com - http://w

[web2py] Re: upload field and IS_IMAGE

2016-08-18 Thread 黄祥
pls try : requires = IS_EMPTY_OR([IS_LENGTH(16384), IS_IMAGE() ] ) best regards, stifan -- 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

[web2py] Re: Upload file from 'static/images' to database

2016-03-29 Thread Dave S
On Tuesday, March 29, 2016 at 2:28:13 PM UTC-7, Nick Michael wrote: > > Hi, I'm having some trouble and was hoping someone could point me in the > right direction. > > I'm creating an application which has an input form which stores to a > database. One entry accepts images, but can also be lef

[web2py] Re: Upload file using the LOAD (....., ajax = True)

2016-03-28 Thread Massimo Di Pierro
OK. I guess I misunderstood. Let me study your solution and get back to you. On Sunday, 27 March 2016 11:07:21 UTC-5, Mike Constabel wrote: > > Hello Massimo, > > Am Sonntag, 27. März 2016 17:18:42 UTC+2 schrieb Massimo Di Pierro: >> >> Hello Mike, >> >> could you explain your patch to web2py-deve

[web2py] Re: Upload file using the LOAD (....., ajax = True)

2016-03-27 Thread Mike Constabel
Hello Massimo, Am Sonntag, 27. März 2016 17:18:42 UTC+2 schrieb Massimo Di Pierro: > > Hello Mike, > > could you explain your patch to web2py-developers? it is quite extensive. > > I think you misunderstood me (or I didn't explain it well). This "patch" is only a summary of what I found in thi

[web2py] Re: Upload file using the LOAD (....., ajax = True)

2016-03-27 Thread Massimo Di Pierro
Hello Mike, could you explain your patch to web2py-developers? it is quite extensive. On Saturday, 26 March 2016 13:00:25 UTC-5, Mike Constabel wrote: > > Hello all and Anthony, > > Am Freitag, 20. November 2015 07:52:05 UTC+1 schrieb Bart: >> >> Hi Anthony, >> >> This solution you mention is, wi

[web2py] Re: Upload file using the LOAD (....., ajax = True)

2016-03-26 Thread Mike Constabel
Hello all and Anthony, Am Freitag, 20. November 2015 07:52:05 UTC+1 schrieb Bart: > > Hi Anthony, > > This solution you mention is, with some minor changes, still working in > the current version. I've managed to get the change working in the 2.12.3 > version of web2py.js: > Change function trap

[web2py] Re: upload using restful

2016-01-22 Thread Dave S
On Tuesday, November 24, 2015 at 11:21:05 AM UTC-8, Dave S wrote: > > > > On Tuesday, November 24, 2015 at 8:33:20 AM UTC-8, Jose wrote: >> >> Hi Leonel >> >> How it is handled on the server (web2py app)? >> > > Does this help explain it? > > http://web2py.com/books/default/chapter/29/10/servic

[web2py] Re: upload using restful

2015-11-24 Thread Dave S
On Tuesday, November 24, 2015 at 8:33:20 AM UTC-8, Jose wrote: > > Hi Leonel > > How it is handled on the server (web2py app)? > Does this help explain it? http://web2py.com/books/default/chapter/29/10/services#Restful-Web-Services> I've used the SOAP service model successfully -- the RESTful

[web2py] Re: upload using restful

2015-11-24 Thread Jose
Hi Leonel How it is handled on the server (web2py app)? -- 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 subscr

[web2py] Re: upload using restful

2015-11-24 Thread Leonel Câmara
Here's an example using requests http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file Is this what you want? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p

[web2py] Re: upload using restful

2015-11-24 Thread Leonel Câmara
Sure it is. What's your question? -- 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 Group

[web2py] Re: Upload file using the LOAD (....., ajax = True)

2015-11-19 Thread Bart
Hi Anthony, This solution you mention is, with some minor changes, still working in the current version. I've managed to get the change working in the 2.12.3 version of web2py.js: Change function trap_form to: trap_form: function(action, target) { /* traps any LOADed form */

[web2py] Re: upload file path

2015-11-17 Thread Manuele Pesenti
Il 17/11/15 14:36, Manuele Pesenti ha scritto: > doh! I beg your pardon mail was sent before it was finished... I meant > > path_to_file = os.path.join(db.mytable.archivio.uploadfolder, > row.archivio.aplit('.')[-1][:2], row.archivio) Uhm I've looked a bit in the code and I think I've found the rig

[web2py] Re: upload file path

2015-11-17 Thread Manuele Pesenti
Il 17/11/15 14:29, Manuele Pesenti ha scritto: > maybe something like: > > path_to_file = os.path.join(db.mytable.archivio.uploadfolder, , > row.archivio) doh! I beg your pardon mail was sent before it was finished... I meant path_to_file = os.path.join(db.mytable.archivio.uploadfolder, row.archiv

[web2py] Re: upload field type doesn't show in grid or smartgrid

2015-10-20 Thread 黄祥
yes, you are right, my bad, there is readable = False, set for the upload field type in the middle of somewhere (i couldn't found in the first place, but now target spoted and silenced :) ). best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:

[web2py] Re: upload field type doesn't show in grid or smartgrid

2015-10-20 Thread Massimo Di Pierro
Should work. Can you provide an example of code to reproduce? On Monday, 19 October 2015 23:20:05 UTC-5, 黄祥 wrote: > > hi, > > i have upload field type doesn't show in grid or smartgrid, in the older > version i believe it shown by default. is it normal in the recent version > (2.12.3) not shown

[web2py] Re: upload and sqlform.grid

2015-10-07 Thread Laurent Lc
Found : def showonly(): query=(db.personnel.present=='present') #links=[{'header':T('picture'),'body':lambda row: IMG(_src=row.picture, _width=50, _height=40, _id='picture')}] db.personnel.picture.represent = lambda pic,row : IMG(_src=URL('default', 'download', args=pic)) grid =

[web2py] Re: Upload via ajax

2015-09-03 Thread Jose
El jueves, 3 de septiembre de 2015, 14:50:37 (UTC-3), Jose escribió: > > Hi > > I want to upload a file via ajax. What I have working for when the file is > stored in a folder, the problem and when I want it stored in a blob field. > > *In upload_picture function I do not know how to put the val

[web2py] Re: upload field

2015-04-25 Thread 黄祥
perhaps you can use validators on form level. e.g. requires = IS_UPLOAD_FILENAME(extension='pdf') ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Special-type-validators best regards, stifan On Saturday, April 25, 2015 at 10:28:10 PM UTC+7, KevC wrote: > > Hi! > > I want

[web2py] Re: upload e CASCADE delete

2015-04-17 Thread pang
El miércoles, 15 de enero de 2014, 15:39:07 (UTC+1), Anthony escribió: > > The cascading delete is handled by the database, so the web2py DAL is not > executing the delete from the db.allegato table and therefore doesn't have > the opportunity to run the _before_delete and _after_delete callbac

Re: [web2py] Re: Upload field default value ?!!

2015-03-04 Thread António Ramos
You are right I wrote before checking again. Last time i checked, after removing the "required", the record could not be saved. Then checked the sqlite db via firefox plugin and still the required was set at the sqlite db. So far so good more on this later if problems. Thank u 2015-03-04 1

[web2py] Re: Upload field default value ?!!

2015-03-04 Thread Leonel Câmara
Humm required is set at the DAL level I don't see how this could create problems due to sqlite. -- 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 recei

[web2py] Re: Upload file using POST

2014-11-28 Thread Parth Bhushan
Hi, I have this weird scenario in which i have to send the filename in the query parameter like this: 'host' : wpvr_variables.ajaxurl + '?action=wpvr_upload_file' + '&filename=recorded_file' + wpvr_variables.post_id, but it is only taking the first parameter action from the url and discarding

Re: [web2py] Re: upload a file with just a post request

2014-11-14 Thread António Ramos
response.headers['Content-Disposition'] = 'attachment' !! 2014-11-14 13:50 GMT+00:00 António Ramos : > like i did the mp3 is played in the webpage. > > I want the browser to "download" it > > Is there a trick in the code ? > > Thank you > > 2014-11-14 12:56 GMT+00:00 António Ramos : > >> row

Re: [web2py] Re: upload a file with just a post request

2014-11-14 Thread António Ramos
like i did the mp3 is played in the webpage. I want the browser to "download" it Is there a trick in the code ? Thank you 2014-11-14 12:56 GMT+00:00 António Ramos : > row=db(db.mp3s.keyflag==request.args[0]).select().first() > > filename=os.path.join(request.env.web2py_path,"applications",

Re: [web2py] Re: upload a file with just a post request

2014-11-14 Thread António Ramos
row=db(db.mp3s.keyflag==request.args[0]).select().first() filename=os.path.join(request.env.web2py_path,"applications",request.application,"uploads",row['mp3']) response.headers['Content-Type']='audio/mpeg' return open(filename,'rb') It works :) thank you 2014-11-14 12:38 GMT+00:00

Re: [web2py] Re: upload a file with just a post request

2014-11-14 Thread António Ramos
but how do i code a controller that accepts the name or other field and returns the mp3 saved ? 2014-11-14 12:31 GMT+00:00 Leonel Câmara : > Well if you coded it like that you saved the original filename in the name > field, the cloudservice can just use that. > > -- > Resources: > - http://we

[web2py] Re: upload a file with just a post request

2014-11-14 Thread Leonel Câmara
Well if you coded it like that you saved the original filename in the name field, the cloudservice can just use that. -- 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

Re: [web2py] Re: upload a file with just a post request

2014-11-14 Thread António Ramos
another thing i dont know how to do. i have my db.myfile.insert(name=request.post_vars.filename.filename, cloudfile=db.myfile.cloudfile. store(request.post_vars.filename),key=timestamp) i added also a timestamp param in the insert to later get it from the cloud service How to i code the retriev

Re: [web2py] Re: upload a file with just a post request

2014-11-13 Thread António Ramos
Thank you I´ll do that! 2014-11-13 23:23 GMT+00:00 Niphlod : > BTW: take care to protect that function with some kind of restriction > (usually ip-based). If an attacker knows the endpoint it'll flood your app > with "fake" attachments as soon as he can :-P > > On Thursday, November 13, 2014 6:30

Re: [web2py] Re: upload a file with just a post request

2014-11-13 Thread Niphlod
BTW: take care to protect that function with some kind of restriction (usually ip-based). If an attacker knows the endpoint it'll flood your app with "fake" attachments as soon as he can :-P On Thursday, November 13, 2014 6:30:55 PM UTC+1, Ramos wrote: > > Very informative. > I´m more than satis

Re: [web2py] Re: upload a file with just a post request

2014-11-13 Thread António Ramos
Very informative. I´m more than satisfied. Thank u António 2014-11-13 17:23 GMT+00:00 Leonel Câmara : > The cloud service is calling the controller putting the same vars in get > and post variables (no idea why they do that), so request.vars makes a list > of the values it gets for the same n

[web2py] Re: upload a file with just a post request

2014-11-13 Thread Leonel Câmara
The cloud service is calling the controller putting the same vars in get and post variables (no idea why they do that), so request.vars makes a list of the values it gets for the same name as request.vars has both get and post vars. -- Resources: - http://web2py.com - http://web2py.com/book (D

Re: [web2py] Re: upload a file with just a post request

2014-11-13 Thread António Ramos
no, with request.post_vars ido not get duplicates. is there a reason why ? Thank you António 2014-11-13 16:48 GMT+00:00 Leonel Câmara : > Instead of request.vars use request.post_vars, do you still have > duplication? > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documen

[web2py] Re: upload a file with just a post request

2014-11-13 Thread Leonel Câmara
Instead of request.vars use request.post_vars, do you still have duplication? -- 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 b

Re: [web2py] Re: upload a file with just a post request

2014-11-13 Thread António Ramos
For the record i´m using web2py 2.9.5 Another problem i have is that the params that i send from the cloud service are received in duplicate inside an array. They told me that the issue must be an web2py issue. See below my request vars output nr and flag are an array of duplicate values. In m

[web2py] Re: Upload path broken since 2.9.11 update

2014-11-13 Thread Leonel Câmara
Why don't you make a pull request so you don't have to remember this in your next update? -- 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 t

[web2py] Re: Upload path broken since 2.9.11 update

2014-11-13 Thread Anthony
Which version of web2py were you using prior to the upgrade? On Thursday, November 13, 2014 4:04:19 AM UTC-5, Louis Amon wrote: > > Hi, > > My website has been using web2py for a few months now, and we handle > pictures using Amazon S3 and Cloudfront for storage and distribution. > > The correspo

[web2py] Re: upload a file with just a post request

2014-11-13 Thread Leonel Câmara
You did get it in request.vars it's just not called 'upload' like in my example, you call it 'filename'. So: models: db.define_table('myfile', Field('name'), Field('cloudfile', 'upload'), ) controller: def post_file(): """ Controller to post files """ if 'filename' in request.v

Re: [web2py] Re: upload a file with just a post request

2014-11-13 Thread António Ramos
Oops seem like that i dont receive the upload in request.vars here is my request.vars : > Done! > Thank u > > 2014-11-12 17:54 GMT+00:00 Leonel Câmara : > >> Yes, yes it is. That's what forms do anyway. In fact you can use SQLFORM >> to do this if you want. >> >> Here's an example solution not

Re: [web2py] Re: upload a file with just a post request

2014-11-12 Thread António Ramos
Done! Thank u 2014-11-12 17:54 GMT+00:00 Leonel Câmara : > Yes, yes it is. That's what forms do anyway. In fact you can use SQLFORM > to do this if you want. > > Here's an example solution not using forms, say your file goes in var > upload > > def post_file(): > """ Controller to post files

[web2py] Re: upload a file with just a post request

2014-11-12 Thread Leonel Câmara
Yes, yes it is. That's what forms do anyway. In fact you can use SQLFORM to do this if you want. Here's an example solution not using forms, say your file goes in var upload def post_file(): """ Controller to post files """ if 'upload' in request.vars: db.myfile.insert(name=reque

[web2py] Re: Upload to static folder in other application

2014-10-26 Thread Anthony
> > When the user inserts a subgroup this works, however, when the user > updates the name and description and does not > re-upload an image I get the following error: > > Is there a way to prevent this from happening? > > Traceback (most recent call last): > File "/Users/iannet/web2py-deutschl

[web2py] Re: Upload to static folder in other application

2014-10-15 Thread Annet
Hi Anthony, Thanks for your reply. I tried your code and it works. I have a related question, I have a table grp_subgroup which apart from fields groupID, imageFilename and image, also contains fields name and description in a function I have the following code to store the original file name:

[web2py] Re: Upload to static folder in other application

2014-10-14 Thread Anthony
Have you tried: db.img_logo.image.uploadfolder = os.path.join(request.env. applications_parent, 'applications', 'my', 'uploads', folder) Anthony On Tuesday, October 14, 2014 1:29:39 PM UTC-4, Annet wrote: > > I web2py/applications I have 3 applicati

[web2py] Re: Upload field custom manipulation

2014-08-05 Thread Kuba Kozłowicz
What does "writable=false if forms" mean and WHAT should I apply this to? And where should I plug this "URL('mydownload', ... ) into? Sorry, but I understand if you just write some web2py-specific code completely out of contex. It requires some explanation. W dniu niedziela, 3 sierpnia 2014 00:

[web2py] Re: Upload field custom manipulation

2014-08-05 Thread Kuba Kozłowicz
Ok so I've already figured out what you meant. I should set 'writable' attribute of this field in db_wizard.py to False in order to prevent this field from being overwritten in forms. Then change type from 'string' to 'upload' and apply URL('mydownload') to 'represent' attribute of this field

[web2py] Re: Upload field custom manipulation

2014-08-02 Thread Massimo Di Pierro
Than it is easy. make it writable=false if forms. Store your filename in the the upload field. But instead of URL('download',) use URL('mydownload',) Where: def mydownload(): fullname = os.path.join(os.path.join, 'private', request.args(0)) response.stream(fullname) On Wed

[web2py] Re: Upload field custom manipulation

2014-07-31 Thread Kuba Kozłowicz
f_invoice_file_path is location where the file is stored by myself, because I generate these files myself and I save them myself as well. It contains whole path to the file ( with the filename and its extension ). They are stored under "private" directory with the structure I described above. I

[web2py] Re: Upload field custom manipulation

2014-07-29 Thread Massimo Di Pierro
Let me understand this better f_invoice_file_path is the location where the file is supposed to be stored or is it the full path including the desired filename? Do you handle the file writing or should web2py do it automatically? On Tuesday, 29 July 2014 05:59:10 UTC-5, Kuba Kozłowicz wrote: >

[web2py] Re: upload progress recipe not working

2014-07-01 Thread cowbert
So I inserted a console.log(data) after calling $.getJSON to see what data the ajax call would return as a large file is uploaded. It does return a json object containing 'length' and 'uploaded' but the values are always zero. I also set X-Progress-ID and uuid to the same static test value and

[web2py] Re: Upload txt, HTML, etc and display them

2014-06-17 Thread Anthony
How are you having the files uploaded? On Tuesday, June 17, 2014 12:36:42 PM UTC-4, Harish Krishna wrote: > > I don't think directory traversal is too much of a problem. > Another thing I can handle is somehow know what this renamed equivalent > of my file is. I could maintain this on a table or

[web2py] Re: Upload txt, HTML, etc and display them

2014-06-17 Thread Harish Krishna
I don't think directory traversal is too much of a problem. Another thing I can handle is somehow know what this renamed equivalent of my file is. I could maintain this on a table or something. On Tuesday, June 17, 2014 7:09:08 PM UTC+5:30, Anthony wrote: > > Note, the file renaming is done to

[web2py] Re: Upload txt, HTML, etc and display them

2014-06-17 Thread Anthony
Note, the file renaming is done to prevent directory traversal attacks, so may not be a good idea to circumvent that. To show the pages, just serve them as any static file. Assuming the filename is in a variable called "filename": URL('static', filename) will create a URL to serve the file. A

[web2py] Re: Upload txt, HTML, etc and display them

2014-06-17 Thread Harish Krishna
In fact, it would be great if I can specify the name of the file that is stored in the static folder. How do I do that? On Tuesday, June 17, 2014 4:52:51 PM UTC+5:30, Harish Krishna wrote: > > I am building this portal where people can upload HTML files. I notice > that the uploaded files are by

[web2py] Re: Upload image using RESTful api

2014-05-29 Thread iw3ijq
Found the issue: storage of files is handled by sqlhtml and not by DAL. So I have to write a function that replicate te file storage part of sqlhtml. Il giorno martedì 6 maggio 2014 15:19:22 UTC+2, iw3...@gmail.com ha scritto: > > Thaks, I will try. > I don't think that the iproblem is the requ

[web2py] Re: Upload image using RESTful api

2014-05-06 Thread iw3ijq
Thaks, I will try. I don't think that the iproblem is the request. Using a socket sniffer I saw that request made by browser and my script are the same. The problem could be in restful api. Il giorno martedì 6 maggio 2014 00:33:00 UTC+2, samuel bonill ha scritto: > > i use postman(http://www.get

[web2py] Re: Upload image using RESTful api

2014-05-05 Thread samuel bonill
i use postman(http://www.getpostman.com/) for test restful api and works grate... El lunes, 5 de mayo de 2014 11:49:50 UTC-5, iw3...@gmail.com escribió: > > Hi! > > I have a SQLFORM with some filelds and an image (like example here: > http://web2py.com/books/default/chapter/29/07/forms-and-valid

[web2py] Re: Upload file to copy.com

2014-02-06 Thread Alan Etkin
> > Hi everyone, > > Is there a way for a web2py app, instead of uploading a file to the server > local file system, to upload a file to a www.copy.com account? > You can handle dropbox data from web2py apps instead http://www.web2py.com/books/default/chapter/29/14/other-recipes?search=dropbox#

[web2py] Re: Upload file functionality

2014-01-16 Thread Anthony
On Thursday, January 16, 2014 12:29:11 PM UTC-5, LaDarrius Stewart wrote: > > > from the form2 in the upload method above is how the link is made and the > custom store retrieve was from an example on the web there isnt many. > But its like its not even using the custom retrieve cause why is looki

[web2py] Re: Upload file functionality

2014-01-16 Thread LaDarrius Stewart
from the form2 in the upload method above is how the link is made and the custom store retrieve was from an example on the web there isnt many. But its like its not even using the custom retrieve cause why is looking there for the file. Is there and example of using the built in way? On Thursda

[web2py] Re: Upload file functionality

2014-01-16 Thread Anthony
Where/how is this link generated: *http://127.0.0.1:8000/facesheet/default/upload/1/John/Smith/download/test3.docx * Why do you need the custom store and retrieve functions -- what's wrong with the built-in method

[web2py] Re: Upload file functionality

2014-01-16 Thread LaDarrius Stewart
Looking at my custom retrieve file shouldnt the path be looking in here path = "applications/facesheet/uploads" On Thursday, January 16, 2014 10:25:21 AM UTC-6, LaDarrius Stewart wrote: > > I thought I was on the correct path with this can soemone tell me where > this is going wrong? > > db.defi

  1   2   3   4   >