Iam doing this:
I recieved the attachment I got from the website
Python Controller:
@ http.route ( '/ topup' , type = 'http' , auth = "public" , website = True )
def create_topup ( self , ** kw):
file = kw.get ( 'reciept' , False )
attachment = file.read ()
request.env [ 'model.request' ] .create ( dict ( file = attachment) )
XML File:
<formid = "topup-form" action = "/ topup" method = "post" enctype = "multipart / form-data" role = "form" style = "display: none;" >
<input type = "file" multiple = "true" class = "form-control or_website_form_input" name = "reciept" /></form>
Python Model:
file = fields.Binary ( 'File' , help = "File to check and / or import" )
But the model form view whenever i try to download the file I get the error :
The server encountered an internal error and it was unable to complete your request. Either the server is overloaded or there is an error in the application.