cleverscale/zenpush — pull request #7 by alexkwolfe (2013-03-11 17:47:31+00:00)
Title: Linked images are uploaded on push

### Pull Request Summary

1. persistent connections with Zendesk using `persistent_httparty`
2. automatic uploads of images linked in markup
3. automatic clean up of images previously uploaded
4. using a local .ruby_version file

### Image Uploads

This feature works with Markdown and HTML. Images in the markup point to image files using file system paths. ZenPush handles the rest.

##### On Topic Creation...

* The file system is searched for all relative image links in the HTML
* A Zendesk "upload" is created for all images in the HTML
* The Zendesk upload token is stored in an invisible `span` element in the topic HTML (does not modify local files)
* Topic HTML is rewritten to point to Zendesk URLs for uploaded images (does not modify local files)

##### On Topic Update...

* On topic update, the upload token is retrieved from the existing topic HTML
* The upload is deleted, thereby deleting all images previously uploaded
* The upload process for Topic creation is invoked