i am creating an RESTful api for a Django website. I am using tastypie for doing it. My problem is i could'nt design how to post images or files via this api. I mean, to create an object on database we are posting data in json format. But how can i put a file inside that json?
I found that there is two methods one of them is converting them Base64 format. I don't want to use it because in my tests, image which is 74kb is being 110kb-120kb when converted to Base64.
So can anybody explain me how can i post an object that contains files inside it?