error when attaching a file

Bug #701439 reported by Marcilene Ribeiro
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Web Client
Won't Fix
Medium
Unassigned

Bug Description

Hello,
When you save a file on the web instead of saving the filestore directory, is adding information from the path well, "C: \ fakepath \ file_example.txt", and also keeps reading the file.

description: updated
Revision history for this message
DBR (OpenERP) (dbr-openerp) wrote :

Hello,

The following steps for reproduced Bug:[Windows]
1) Installing Document Module.
2) Add any Attachment.
3) Try to save it.

The problem occurred.

Thanks.

Changed in openobject-client-web:
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Marcilene Ribeiro (mrasistemas) wrote :

Hello Devishree,

The error is not only on Windows. I'm using Linux.

Thanks.

Revision history for this message
Antony Lesuisse (OpenERP) (al-openerp) wrote :

As revision revno: 4310 revision-id: <email address hidden> on linux

I cannot reproduce this bug, i enabled the file storage after installing the "document" module,
I tried to attach a file on a PO and then i downloaded it back. Everything seems ok including the
Content-Disposition: attachment; filename="filename.txt"
HTTP header.

I close this bug, if you can reproduce it, please reopen it with a _very precise_ description on how you reproduce it.

Changed in openobject-client-web:
milestone: none → 6.0
status: Confirmed → Invalid
Revision history for this message
Jacara (baskhuujacara) wrote :

Hello

I faced this bug too.
The reason is chromium-browser.

I'm using chromuim-browser on Ubuntu and i uplaoded image.png file into ir.attachment model but filename field is setted as "C:\fakepath\image.png" so i tried download this file then getting errors.

<type 'exceptions.TypeError'>: save_binary_data() takes at most 2 non-keyword arguments (4 given)
      args = ('save_binary_data() takes at most 2 non-keyword arguments (4 given)',)
      message = 'save_binary_data() takes at most 2 non-keyword arguments (4 given)'

Please check it and reopen this bug.

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Hello i reproduce this bug with 4808 revno, steps to reproduce it:

Install document module
Configure filestore as media storage
Create a directory with filestorage
Upload a file
Try to download this file, please check this i get my system in production and need a fix.

 i get this output:

The above is a description of an error in a Python program. Here is
the original traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/cherrypy/_cprequest.py", line 606, in respond
    cherrypy.response.body = self.handler()
  File "/usr/lib/python2.6/site-packages/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/home/openerp/openerp/web60/openobject/tools/_expose.py", line 182, in func_wrapper
    res = func(*args, **kw)
  File "/home/openerp/openerp/web60/openobject/controllers/_root.py", line 90, in default
    return request.handler()
  File "/usr/lib/python2.6/site-packages/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/home/openerp/openerp/web60/addons/openerp/controllers/utils.py", line 112, in wrapper
    return fn(*args, **kw)
  File "/home/openerp/openerp/web60/openobject/tools/_expose.py", line 182, in func_wrapper
    res = func(*args, **kw)
TypeError: save_binary_data() takes at most 2 non-keyword arguments (4 given)

Changed in openobject-client-web:
status: Invalid → Confirmed
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

I check the problem and c: and fakepath are added in URL and create the problem.
URL: save_binary_data/C:/fakepath/FILENAME?args Error 405
URL: save_binary_data/FILENAME?args OK 200

I dont know yet where add this args.

Regards,

Revision history for this message
Duongkinden (duongcdtin5) wrote :

Please try with cherrypy version 3.1.2

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

I use it.

The problems is with c:\fakepath str, but i dont know when is added this.

Changed in openobject-client-web:
assignee: OpenERP R&D Web Team (openerp-dev-web) → nobody
Revision history for this message
Amit Parik (amit-parik) wrote :

Web 6.0 not developed any more.

Thanks!

Changed in openobject-client-web:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.