-
This is the skeleton form for uploading images. It has a username field (name="
username
") and a file input field (name="fileinput
"). - This is the action part of the skeleton form. This is the url to which the form is posted. It takes the images posted in the form and processes the images into JPEG form whatever the format may the image be, and stores in the server.
-
This url returns a json object, containing the list of image urls in them. The domain name or the IP should be prefixed with the
url
string to get the image. - This is the url that is used to get the image stored in the server. This is the image url returned during the form posting and from the Username URL.
Accordingly each URI method may return unexpected result if the inputs given are not matched.
- Post URL
- If a file of any content type but image is posted it will return a json object as follows :(status code
500
){ "status": 500, "error": "Image type not recogonsied" }
- If a file of any content type but image is posted it will return a json object as follows :(status code
- Username URL
- If the username in the url is not found in the system :(status code
404
){ "status": 404, "error": "User not found" }
- If the username in the url is not found in the system :(status code
- Image URL
- In the image url if the username entered is not found, it will return a json as above. And if the image of given name in the url is not found :
{ "status": 404, "error": "Image not found" }
- In the image url if the username entered is not found, it will return a json as above. And if the image of given name in the url is not found :