{"action":"created","issue":{"url":"https://api.github.com/repos/jcs/rubywarden/issues/65","repository_url":"https://api.github.com/repos/jcs/rubywarden","labels_url":"https://api.github.com/repos/jcs/rubywarden/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/jcs/rubywarden/issues/65/comments","events_url":"https://api.github.com/repos/jcs/rubywarden/issues/65/events","html_url":"https://github.com/jcs/rubywarden/pull/65","id":351161661,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4ODI1NDYy","number":65,"title":"Adding support for attachments","user":{"login":"universal","id":1049,"node_id":"MDQ6VXNlcjEwNDk=","avatar_url":"https://avatars0.githubusercontent.com/u/1049?v=4","gravatar_id":"","url":"https://api.github.com/users/universal","html_url":"https://github.com/universal","followers_url":"https://api.github.com/users/universal/followers","following_url":"https://api.github.com/users/universal/following{/other_user}","gists_url":"https://api.github.com/users/universal/gists{/gist_id}","starred_url":"https://api.github.com/users/universal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/universal/subscriptions","organizations_url":"https://api.github.com/users/universal/orgs","repos_url":"https://api.github.com/users/universal/repos","events_url":"https://api.github.com/users/universal/events{/privacy}","received_events_url":"https://api.github.com/users/universal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-16T11:18:31Z","updated_at":"2018-08-17T17:04:09Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/jcs/rubywarden/pulls/65","html_url":"https://github.com/jcs/rubywarden/pull/65","diff_url":"https://github.com/jcs/rubywarden/pull/65.diff","patch_url":"https://github.com/jcs/rubywarden/pull/65.patch"},"body":"This branch adds support for attachments:\r\n * relevant api methods have been documented in API.md\r\n * Files are stored as received under their uuid in ```data/attachments/cipher-uuid/uuid```. \r\n * There are some basic specs regarding the basic crud operations on attachments. \r\n * Currently the models only takes care of the information saved in the database, and the controller/route handles the storage and deletion of files from the filesystem\r\n * Controller is in ```lib/routes/attachment.rb``` and it uses some methods from ```lib/helpers/attachment_helpers.rb```\r\n * deleting a cipher has been extending to also clean up attachments"},"comment":{"url":"https://api.github.com/repos/jcs/rubywarden/issues/comments/413928596","html_url":"https://github.com/jcs/rubywarden/pull/65#issuecomment-413928596","issue_url":"https://api.github.com/repos/jcs/rubywarden/issues/65","id":413928596,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzkyODU5Ng==","user":{"login":"jcs","id":9888,"node_id":"MDQ6VXNlcjk4ODg=","avatar_url":"https://avatars1.githubusercontent.com/u/9888?v=4","gravatar_id":"","url":"https://api.github.com/users/jcs","html_url":"https://github.com/jcs","followers_url":"https://api.github.com/users/jcs/followers","following_url":"https://api.github.com/users/jcs/following{/other_user}","gists_url":"https://api.github.com/users/jcs/gists{/gist_id}","starred_url":"https://api.github.com/users/jcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcs/subscriptions","organizations_url":"https://api.github.com/users/jcs/orgs","repos_url":"https://api.github.com/users/jcs/repos","events_url":"https://api.github.com/users/jcs/events{/privacy}","received_events_url":"https://api.github.com/users/jcs/received_events","type":"User","site_admin":false},"created_at":"2018-08-17T17:04:09Z","updated_at":"2018-08-17T17:04:09Z","author_association":"OWNER","body":"I think all of the code for managing attachments/files should go in an Attachment model so you're not deleting files from the controller.\r\n\r\nI wonder if just putting the binary blobs into SQLite (maybe base64 encoded) would make things easier and more self-contained.  I've never needed to store files in my password manager so I don't know what sizes are typical with these files and how frequently they are accessed.\r\n\r\nIf the files will be large, the `send_file` call should probably use `X-Sendfile` instead so Sinatra/Rack isn't tied up serving a big file and letting the frontend server do it."}}
{"actor":{"display_login":"jcs"}}