Tag Archives: framework

Django Rest Framework, Testing ImageField

I start developing a web API with Django rest framework lately. So It was a little bit challenging for me to write the test for ImageField because I am not so familiar with Django environment.

So I just publish how I got over the problem. Maybe it helps someone out there.

In my case, It was a simple category app with photo field. All we need to do is populate the field with an image file but the trick is that the request format must be ‘multipart‘.


Slim framework 3 and Jquery File Upload

This week, I tried php slim framework 3 and also implemented the Jquery File Upload plugin. Project contains only one controller which is named as “UploadController” under the namespace of “Imagely”.

In order to try the project, you can easily clone the repository, Install the dependencies via composer and start using the project.

It has also a simple Eloquent model. If you set up a database you can also store some information about the images that you upload.

For the front-end you will see a simple bootstrap template.

You can find the repo at link below. I hope this helps some people out there.