mwasilak / txThings

CoAP library for Twisted
94 stars 43 forks source link

File as payload? #8

Closed shashankgaur closed 8 years ago

shashankgaur commented 8 years ago

Hi, Its not an issue but more like a request! Would it be possible to send a file as payload? Specially a executable byte code (such as .pyc)? I think it can be. I tried with parsing and using block wise transfer, but didnt get it working. Can you suggest some tips? I think I am not getting things about how to change the options for the block wise transfer. Also do I need to parse the file?

Thanks a lot

shashankgaur commented 8 years ago

Seems it was much easier than I thought. I was making it complex unnecessarily. Sorry for the stupid query and thanks for amazing support.

Anyone who wants to send a file as payload, just set payload as the file content by reading it.