Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5488 มุมมอง

I uploaded a file as attachment through ir.attachments  model.

I am able to locate that file locally location which is

/.local/share/Odoo/filestore/mydb/0c/0c45faf5b09ce9b7c9fbb6bd1a7787f24d24ab8

How to get the exact file in exact format which i uploaded which is my_file.shp instead of this encrypted file because i wanted to do some manipulation/processing on this file through python code.

I wanted to decrypt this file back to original format and extension with a path associated with it.

Thanks

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can retrieve the name of the encrypted file in the filestore using the Odoo database. In the table ir.attachments, there are columns named checksum ​and name that allow you to establish the connection between those.

Based on your example, you could have done this:

SELECT name
FROM ir_attachment
WHERE checksum='0c45faf5b09ce9b7c9fbb6bd1a7787f24d24ab8'

The field name would have been: my_file.shp.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi! I've the same problem, have you managed to solve the problem? I need to manipulate it in PHP for a script.

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 20
7929
0
ก.พ. 19
3162
1
ม.ค. 23
9168
0
ส.ค. 18
3641
1
ส.ค. 15
5634