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

Hey, I need to encode a file to base64 to store it as an attachment, however base64 module is not available in server actions, how to process?

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

Hello, can explain on detail how you could use base64 module on server actions.

Regards.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Well as you can't close or delete forum posts (wtf) heres the strange answer:


     return {
            'uid': self._uid,
            'user': self.env.user,
            'time': time,
            'datetime': datetime,
            'dateutil': dateutil,
            'timezone': timezone,
            'b64encode': base64.b64encode,
            'b64decode': base64.b64decode,
        }
อวตาร
ละทิ้ง