Image Upload API using Express and S3
Represents an image file hosted on S3.
-
GET
/img/{key}Get Image identified by
key.Parameters:
Parameters Required/Optional Type Description Path Params keyRequired String Identifies Image to be fetched. Response:
Property Type Description 200 fileURLURL S3 URL linking to the speified file. keyString UID for S3 object representing the image. timestampUnixtime Denotes time of creation. sizeNumber Size of image in bytes. 404 statusNumber Status Code (404) messageString Message (Image Not Found) -
POST
/imgUpload Image.
Parameters
Parameters Required/Optional Type Description Body Params imageRequired File Image file to be uploaded. Response:
Property Type Description 200 fileURLURL S3 URL linking to the speified file. 400 statusNumber Status Code (400) messageString Message (File Not Specified) -
DELETE
/img/{key}Delete Image identified by 'key'.
Parameters
Parameters Required/Optional Type Description Path Params keyRequired String Identifies Image to be deleted. Response:
Property Type Description 200 fileURLURL S3 URL linking to the speified file. 404 statusNumber Status Code (404) messageString Message (Image Not Found)