Hello,
I have a binary field and I would like get the size of this file for prevent the upload.
How can I do ?
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I have a binary field and I would like get the size of this file for prevent the upload.
How can I do ?
Thanks
How about a function in a custom module? Here's the most relevant part you need
import os
check_size = os.path.getsize("/path/filename")
print check_size # not needed, is just for a quick dev check.
The rest of the logic depends on what you need to do exactly.
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
3
thg 7 25
|
8880 | ||
|
1
thg 5 25
|
1134 | ||
|
0
thg 1 24
|
1821 | ||
|
1
thg 2 22
|
24001 | ||
|
0
thg 1 22
|
2853 |