Tweets can now have up to four images attached to them:
Tweet with four images
Editing tweet with images attached
If the image has been uploaded then clicking the "cross" will fade the image
Clicking the "revert" button will stop the image from being deleted, and clicking the "trash" icon will delete the image immediately, otherwise, click the "update" button to delete selected images.
If the image has not been uploaded, there will be no revert, just a delete button.
Images are stored in the backend in a public folder
Tweets can now have up to four images attached to them:
Tweet with four images
Editing tweet with images attached
If the image has been uploaded then clicking the "cross" will fade the image
Clicking the "revert" button will stop the image from being deleted, and clicking the "trash" icon will delete the image immediately, otherwise, click the "update" button to delete selected images.
If the image has not been uploaded, there will be no revert, just a delete button.
Images are stored in the backend in a public folder
You can access an image using the API:
/api/uploads/:uploadId
or the image name, for example:
/uploads/uploadName
http://localhost:3000/uploads/upload_3d4f7d687743b78a49362721ba96f477.jpg
When using the
/uploads/
path, NGINX will direct the request to Koa, Koa will then serve the image (if it exists).Since the images are served, going to the image URL will take you to a page that shows the image if you open the image link.
Clicking an uploaded image will show the full-sized image in a modal.
Along with the images I have written/rewritten a lot of tests and fixed bugs which closes the below issues:
Closes #89 Closes #80 Closes #54 Closes #37