{"action":"created","issue":{"url":"https://api.github.com/repos/CodeSleeve/stapler/issues/167","repository_url":"https://api.github.com/repos/CodeSleeve/stapler","labels_url":"https://api.github.com/repos/CodeSleeve/stapler/issues/167/labels{/name}","comments_url":"https://api.github.com/repos/CodeSleeve/stapler/issues/167/comments","events_url":"https://api.github.com/repos/CodeSleeve/stapler/issues/167/events","html_url":"https://github.com/CodeSleeve/stapler/pull/167","id":170641396,"number":167,"title":"Fix MIME detection and too long URL names","user":{"login":"benallfree","id":1068356,"avatar_url":"https://avatars.githubusercontent.com/u/1068356?v=3","gravatar_id":"","url":"https://api.github.com/users/benallfree","html_url":"https://github.com/benallfree","followers_url":"https://api.github.com/users/benallfree/followers","following_url":"https://api.github.com/users/benallfree/following{/other_user}","gists_url":"https://api.github.com/users/benallfree/gists{/gist_id}","starred_url":"https://api.github.com/users/benallfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benallfree/subscriptions","organizations_url":"https://api.github.com/users/benallfree/orgs","repos_url":"https://api.github.com/users/benallfree/repos","events_url":"https://api.github.com/users/benallfree/events{/privacy}","received_events_url":"https://api.github.com/users/benallfree/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-11T13:08:12Z","updated_at":"2016-08-12T16:30:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CodeSleeve/stapler/pulls/167","html_url":"https://github.com/CodeSleeve/stapler/pull/167","diff_url":"https://github.com/CodeSleeve/stapler/pull/167.diff","patch_url":"https://github.com/CodeSleeve/stapler/pull/167.patch"},"body":"This PR fixes a condition where the file attachment would fail to save in the filesystem because the filesystem name was derived from the URL basename that was too long for the filesystem to support.\r\n\r\nIt also fixes a small issue where hash anchors in URLs would cause file extensions from `pathinfo()` to be incorrect"},"comment":{"url":"https://api.github.com/repos/CodeSleeve/stapler/issues/comments/239494004","html_url":"https://github.com/CodeSleeve/stapler/pull/167#issuecomment-239494004","issue_url":"https://api.github.com/repos/CodeSleeve/stapler/issues/167","id":239494004,"user":{"login":"benallfree","id":1068356,"avatar_url":"https://avatars.githubusercontent.com/u/1068356?v=3","gravatar_id":"","url":"https://api.github.com/users/benallfree","html_url":"https://github.com/benallfree","followers_url":"https://api.github.com/users/benallfree/followers","following_url":"https://api.github.com/users/benallfree/following{/other_user}","gists_url":"https://api.github.com/users/benallfree/gists{/gist_id}","starred_url":"https://api.github.com/users/benallfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benallfree/subscriptions","organizations_url":"https://api.github.com/users/benallfree/orgs","repos_url":"https://api.github.com/users/benallfree/repos","events_url":"https://api.github.com/users/benallfree/events{/privacy}","received_events_url":"https://api.github.com/users/benallfree/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T16:30:33Z","updated_at":"2016-08-12T16:30:33Z","body":"1. Do you mean to put the `$filePath` line back how it was? That won't work because using something other than the URL basename is the point of this PR. The value of `$name` is can be too long for the filesystem because it is derived from the URL basename which can be over 4k characters in some cases. My proposal is to use `tempnam()` to create a filesystem-compatible name. \r\n2. Fixed"}}
{"actor":{"display_login":"benallfree"}}