{"action":"created","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-versioned/issues/177","repository_url":"https://api.github.com/repos/silverstripe/silverstripe-versioned","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-versioned/issues/177/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-versioned/issues/177/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-versioned/issues/177/events","html_url":"https://github.com/silverstripe/silverstripe-versioned/issues/177","id":357056768,"node_id":"MDU6SXNzdWUzNTcwNTY3Njg=","number":177,"title":"SS4 Versioned Asset Replacement","user":{"login":"nglasl","id":3703500,"node_id":"MDQ6VXNlcjM3MDM1MDA=","avatar_url":"https://avatars3.githubusercontent.com/u/3703500?v=4","gravatar_id":"","url":"https://api.github.com/users/nglasl","html_url":"https://github.com/nglasl","followers_url":"https://api.github.com/users/nglasl/followers","following_url":"https://api.github.com/users/nglasl/following{/other_user}","gists_url":"https://api.github.com/users/nglasl/gists{/gist_id}","starred_url":"https://api.github.com/users/nglasl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nglasl/subscriptions","organizations_url":"https://api.github.com/users/nglasl/orgs","repos_url":"https://api.github.com/users/nglasl/repos","events_url":"https://api.github.com/users/nglasl/events{/privacy}","received_events_url":"https://api.github.com/users/nglasl/received_events","type":"User","site_admin":false},"labels":[{"id":587719267,"node_id":"MDU6TGFiZWw1ODc3MTkyNjc=","url":"https://api.github.com/repos/silverstripe/silverstripe-versioned/labels/affects/v4","name":"affects/v4","color":"5319e7","default":false},{"id":587719354,"node_id":"MDU6TGFiZWw1ODc3MTkzNTQ=","url":"https://api.github.com/repos/silverstripe/silverstripe-versioned/labels/change/patch","name":"change/patch","color":"fef2c0","default":false},{"id":587719392,"node_id":"MDU6TGFiZWw1ODc3MTkzOTI=","url":"https://api.github.com/repos/silverstripe/silverstripe-versioned/labels/effort/medium","name":"effort/medium","color":"fef2c0","default":false},{"id":587719429,"node_id":"MDU6TGFiZWw1ODc3MTk0Mjk=","url":"https://api.github.com/repos/silverstripe/silverstripe-versioned/labels/feedback-required/core-team","name":"feedback-required/core-team","color":"DDDDDD","default":false},{"id":587719473,"node_id":"MDU6TGFiZWw1ODc3MTk0NzM=","url":"https://api.github.com/repos/silverstripe/silverstripe-versioned/labels/impact/high","name":"impact/high","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-09-05T03:58:11Z","updated_at":"2018-09-13T02:45:34Z","closed_at":null,"author_association":"NONE","body":"Currently when replacing an asset, the file path changes. For example:\r\n\r\n- Upload asset x, it has path `assets/0897c8f198/x`.\r\n- Replace asset x with y, it now has path `assets/b3a6367074/y`.\r\n- Try accessing `assets/0897c8f198/x` and it gives a 404.\r\n\r\nThe problem here is that somebody may have linked to the asset directly (e.g. a PDF link from another website). Is there any reason why the directory hash changes for this use case? Ideally it would remain the same, so accessing the file will always return the latest version.\r\n\r\nThis was tested and confirmed using *SS4.2.1*."},"comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-versioned/issues/comments/420865081","html_url":"https://github.com/silverstripe/silverstripe-versioned/issues/177#issuecomment-420865081","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-versioned/issues/177","id":420865081,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDg2NTA4MQ==","user":{"login":"chillu","id":111025,"node_id":"MDQ6VXNlcjExMTAyNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/111025?v=4","gravatar_id":"","url":"https://api.github.com/users/chillu","html_url":"https://github.com/chillu","followers_url":"https://api.github.com/users/chillu/followers","following_url":"https://api.github.com/users/chillu/following{/other_user}","gists_url":"https://api.github.com/users/chillu/gists{/gist_id}","starred_url":"https://api.github.com/users/chillu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chillu/subscriptions","organizations_url":"https://api.github.com/users/chillu/orgs","repos_url":"https://api.github.com/users/chillu/repos","events_url":"https://api.github.com/users/chillu/events{/privacy}","received_events_url":"https://api.github.com/users/chillu/received_events","type":"User","site_admin":false},"created_at":"2018-09-13T02:45:34Z","updated_at":"2018-09-13T02:45:34Z","author_association":"MEMBER","body":"A CMS which generates stable URLs is pretty fundamental. We've had \"renamed URLSegment redirection\" in the CMS since 2.x. I think we should honour this principle for files as well. \r\n\r\nI don't care too much if we label it `type/bug` or `type/enhancement`, but high impact bugs are more likely to stay on the radar in terms of our triaging process - so re-adding for now.\r\n\r\n@tractorcow Do you think we could use the `File_Versions` table to determine if there's an old file we need to redirect?"}}
{"actor":{"display_login":"chillu"}}