On Monday, September 25, 2017 at 11:03:59 PM UTC-7, Rudy wrote:
>
> Hi i am working to build a multi-tenant application which has a company 
> table which stores logo and other data. I defined a company table, added 
> extra fields in auth_user and created an action (simplified version) like 
> below. web2py uploaded the logo image file under 
> myapp/uploads/company.logo/af/company.logo.afxxxxxxxx.png, but according to 
> the document(applications/test/uploads/person.image.XXXXX.jpg), I should 
> not have had the company.log/af directories, could anyone explain why?
>

Because you set "uploadseparate"?

gluon/packages/dal/pydal/objects.py, at about 49% (windows more is only 
smart enough to give a percent), explains using the first 2 letters of 
uuid_key.
 

> [...]
>
 

> db.define_table('company',
>                 Field('company_name', requires=IS_NOT_EMPTY(), 
> unique=True), 
>                 Field('phone'),
>                 Field('company_email', requires=IS_NOT_EMPTY()),
>                 Field('website'),
>                 Field('logo', 'upload', label='Company Logo', 
> uploadfolder=os.path.join(request.folder,'uploads'), uploadseparate=True), 
> # 23x23mm, 300K recommended
>                 Field('status', requires=IS_IN_SET(COMPANY_STATUS), 
> default='Active', readable=False, writable=False),
>                 format='%(company_name)s')
>
>
>  
/dps

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to