jamesgeer / conf-twitter-bot

A Twitter Bot to post about academic papers
MIT License
4 stars 0 forks source link

Attach image to tweet #93

Closed jamesgeer closed 1 year ago

jamesgeer commented 1 year ago

Tweets can now have up to four images attached to them:

Tweet with four images image

Editing tweet with images attached image

If the image has been uploaded then clicking the "cross" will fade the image 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. image

Images are stored in the backend in a public folder image

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.

image

Clicking an uploaded image will show the full-sized image in a modal. image

image


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