开发者

How to save a ByteArray from Flex into a FileField in Django

开发者 https://www.devze.com 2023-03-06 03:04 出处:网络
I have some audio data in a byte array in a Flex app that I would like to save to my model in Django. I assume I would use a FileField, but I can\'t seem to get it to work. (My project is set up like

I have some audio data in a byte array in a Flex app that I would like to save to my model in Django. I assume I would use a FileField, but I can't seem to get it to work. (My project is set up like this.) I've tried looking at this sample code for PyAmf, but I can't quite get the two to combine.

If any开发者_运维技巧one has a bit of code to share, that would be lovely!


Django's FileFields are not blobs - they only store the path to where the data is saved on the filesystem. You will need to save the data to disk and put the path into the FileField.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号