[web2py] Upload field causing a temp file issue

2019-08-21 Thread Paul Ellis
I have 2 similar controller functions using SQLFORM() with an upload field. One works and one is giving an error online (not when testing locally). I suspect a file system permission problem but I am not sure. The error only occurs if an image is uploaded. The extra processing after the form is

[web2py] upload field and IS_IMAGE

2016-08-18 Thread Kirill Shatalaev
Hello. I have in model: Field('avatar', 'upload', required=False, autodelete=True, label=T('Avatar'), uploadfolder=os.path.join(request.folder, 'static/images/avatars'), requires=[IS_LENGTH(16384), IS_IMAGE()]) Well, the logic is simple: "avatar is not necessary, but when it

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

2015-10-19 Thread 黄祥
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 the upload field type by default? ref: http://web2py.com/books/default/chapter/29/03/overview#Adding-grids p.s. in the book

[web2py] upload field

2015-04-25 Thread KevC
Hi! I want to upload a file type .PDF in upload field but I only aceept this type of file. What can I do? I hope you can help me. Best regards. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Upload field default value ?!!

2015-03-04 Thread António Ramos
Hello i have an app that was designed with some required upload fields. Now after 1 year and around 5gb in my download folder, someone tells me that the upload fields are not required anymore under some scenarios. I cannot delete the required value from my dal because the sqlite does not let it.

[web2py] Upload field custom manipulation

2014-07-29 Thread Kuba Kozłowicz
I have three tables: - invoices - invoice summaries - invoice bundles The website I am working on provides such a functionality, that user uploads a file, from which invoices and invoice summaries are generated and after being generated they are zipped and put into a bundle. For each upload I

[web2py] Upload field and SQLFORM.grid problem / bug?

2013-05-22 Thread David Marko
I have a table with upload field defined as follows: Field('file', 'upload', uploadseparate=True) . When I create some items using database administration, the image is displayed correctly. When I involve SQLFORM.grid in my controller, the link to file is not correct. See two links below: OK

[web2py] Upload field with clear text filename

2012-12-28 Thread Joe Barnhart
I'm not sure why this is difficult, but I see many posts about this when I search, yet none exactly work for me. This seems like it should be easy but is surprisingly difficult in web2py. I want to keep a table of uploaded files with the uploads in a blob field and the names in clear text in

[web2py] upload field without the upload

2012-12-25 Thread lucas
hello one and all, i am doing en masse data table using xml data to a table that has an upload field. the files are already present in the upload subdirectory but i need to populate the table with the data, including the file name that is the upload field. i hope that made sense. how do i

Re: [web2py] upload field without the upload

2012-12-25 Thread Bruno Cezar Rocha
AFAIK upload fields are just string fields, so you can insert any string there! db.table.insert(filefield=blah) should work! You just have to use Python glob, os, sh or shutil to take a list of files and then populate the database. On Tue, Dec 25, 2012 at 03:40:51PM -0800, lucas wrote:

Re: [web2py] upload field without the upload

2012-12-25 Thread Massimo Di Pierro
You can do it and it will work. But you will not be able to download it using the download action. That is because it expects a certain format for filenames. You will need a custom download action that would know how to located the file from its name. Massimo On Tuesday, 25 December 2012

Re: [web2py] upload field without the upload

2012-12-25 Thread lucas
well, i get this error Traceback (most recent call last): File /opt/web-apps/web2py/gluon/restricted.py, line 212, in restricted exec ccode in environment File /opt/web-apps/web2py/applications/iquanta/controllers/site.py

Re: [web2py] upload field without the upload

2012-12-25 Thread lucas
ok, what if i just upload the file? how do i do that programmically? lucas --

Re: [web2py] upload field without the upload

2012-12-25 Thread Massimo Di Pierro
https://groups.google.com/forum/?fromgroups=#!searchin/web2py/upload/web2py/CWNwcgo3wIU/1K_7wJBPh-0J On Tuesday, 25 December 2012 20:51:21 UTC-6, lucas wrote: ok, what if i just upload the file? how do i do that programmically? lucas --

[web2py] upload field value reset on form failure of another field

2011-12-05 Thread thodoris
Is there any way to keep the value that was inserted on an upload field after failing to validate the form due to another field, so that the user doesn't have to search for the file again?

[web2py] upload field in a generic form?

2011-10-24 Thread pepper_bg
Have to go to the experts for this. I have a table for storing arbitrary user data: db.define_table('extra_attributes', Field('user', db.auth_user), Field('name'), Field('type', requires = IS_IN_SET(('text','file'))),

[web2py] upload field change filename

2011-03-31 Thread Manuele Pesenti
Hi *, is there a way to modify the file name with whom a file is stored in the filesystem using an upload field? I tryied in this way but without success: def upload_static_overlay_form_processing(form): # here form.vars.shp contains the file object and ## form.vars.shp.filename is the

Re: [web2py] Upload field

2011-01-15 Thread Arun K.Rajeevan
No, blob is optional, and it'll work well without specifying a blob field. (I use only upload and it works on GAE too)

[web2py] Upload field

2011-01-11 Thread Kenneth Lundström
I´m trying to find out how form.accepts handles the uploading of files (for my mail gateway) and made a form form=SQLFORM.factory(Field('text','string'), Field('upload','upload')) When I submit a form I get a ticket stating you must specify a

Re: [web2py] Upload field

2011-01-11 Thread Richard Vézina
You need a upload field to store the path and a field to store the name of the file... The book is not clear I think about upload particularly about blob storage... My model : Field('chroma','upload',uploadfield='chroma_blob'), Field('chroma_blob','blob'), You need both doen't matter if you use

[web2py] Upload Field in GAE

2010-06-08 Thread arnaud
Hello, i work with Web2Py on GAE. I try to make a db.insert with SQLFORM.factory method. def test(): form = SQLFORM.factory( Field('logo','upload')) if form.accepts(request.vars, session): new_domain = db.domain.insert(logo = request.vars.logo) response.flash='cool'

[web2py] upload field without storing the file

2010-02-11 Thread Mike
Hopefully this is a quick one... I want to use SQLFORM to allow a user to save information about a file including the *local path*. However I don't want to actually save the file in the database. The idea is to parse the local path and save a portion of it to the db that will match a file