Skip to content

jsninja777/rails-resize-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails Image Resize

Get image info

URL : /images/info/

Method : POST

CURL Command

curl --location --request POST 'http://localhost:3000/images/info' \
--form 'file=@/path/to/file.png'

Success Responses

Code : 200 OK

{
    "success": true,
    "data": {
      "type": "PNG",
      "size": 1024,
      "width": 100,
      "height": 100
    }
}

Error Response

Code : 404 NOT FOUND

{
    "success": false,
    "message": "File is blank or not an image"
}

Resize image

URL : /images/resize/

Method : POST

CURL Command

curl --location --request POST 'http://localhost:3000/images/resize' \
--form 'file=@/path/to/file.png' \
--form 'width=150' \
--form 'height=150'

Success Responses

Code : 200 OK

Response : Resized image

Error Response

Code : 404 NOT FOUND

{
    "success": false,
    "message": "File is blank or not an image"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published