Django Rest Framework image upload and get image - django-rest-framework

I have a use case where an angular front end will need to submit image and Django Rest Framework API will need to save it to filesystem during image upload calls. During image download scenario the image will need also be served up from filesystem.
If someone already figured out this usecase please post it. Help will be highly appreciated.

Django REST framework provides an ImageField that can handle the uploading of images using Django's file upload handlers. So you might be interested in learning how it is done in Django first: Need a minimal Django file upload example

Related

DRF how to open media url using django storage(sftp)?

I'm using storage SFTP module for saving media now i'm facing issues to open image url path as we know there is no media is project directory because i am using sftp.
Please suggest me the best way to render back end images using django rest.
Detailed info: models, view and setting

Using s3 upload function using an imageURI?

I was wondering if it was possible to upload to S3 using the SDK with an imageURI.
I would like to upload a picture to my S3 bucket from a mobile phone camera or gallery. However, the cordova library only returns an imageURI for this picture. It seems like it doesn't work in the S3 upload function. I would prefer to avoid the complexities of the REST API and just use the SDK. Is this possible if I do not have a file object but only an image URI? I am using the Ionic framework if this is useful information to anybody.
Any help is appreciated.
Thanks

SpringMVC: What is the best strategy to display an Image?

May I know what is the best strategy to display an image (blob) from database.
using Spring MVC.
Should I load all the image at once from db or create a controller method to get the images individually?
Some tutorial link will be greatly appreciated.
Save the file on the server rather than the DB, serve up the link address to the file through the controller.
The images should be in a cdn location or similar and the Spring controller just returns a url to them.
EDIT :
If you really must serve up the image from the DB and serve it as bytes, you can find the answer you want here

How to upload image to twitpic in bada

How to share images in twitpic. Social API in bada is not supporting twitpic. Is there another way for this? and what is meant by multipart form data?
By referring sample codes available in SDK we can upload image to server. The example code HTTPUpload with multipartFormdata helped to post the image to twitpic server.
You would need to write the protocol implementation yourself. I don't know it myself so I can't give you an exact answer but the bottom line is you should look at the sockets and web http namespaces, read the twitpic protocol for uploading and implement it... the hard way.
On the multipart side, look here http://en.wikipedia.org/wiki/MIME#Multipart_messages

Upload an image using jquery AJAX in .net MVC

I am creating one application in .net MVC, in which I am using jQuery AJAX to post some data to server. The data posting is working fine, but I also need to upload one image along with the data. I have searched on stack over flow for similar question but they are not able to help me. I donot want to use flash to upload file, pure jquery solution will help me.
Using some solution I tried to post to server, but on server side I am not getting file data.
Please can some body tell me how to implement file upload in jQuery ajax?
Thanks
Ashwani
I think you're out of luck if you want ajax like uploading without flash. Due to security limitations javascript can't do all the things required. Off the top of my head i'd say your only other option will be to use an iframe to make it appear as thought it was an ajax post.
Why not use flash though? YUI Uploader is amazingly simple and works great!

Resources