@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

FileUpload: show File page instead of binary file

Summary:
This modification improves a single link shown to the user.

The goal is to make it easier to change file permissions or
file name or whatever just after the upload of the file itself.

Before this change, doing that was difficult because clicking
on the popup would send you back to the binary file only.

Closes T15165

Test Plan:
- upload a file using drag & drop (for example in a comment)
- click on the popup's link
- you see the File page, not the binary file

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15165

Differential Revision: https://we.phorge.it/D25074

+15 -1
+15 -1
webroot/rsrc/js/core/FileUpload.js
··· 38 38 return this; 39 39 }, 40 40 41 + /** 42 + * Get the File Monogram - like 'F123' 43 + */ 44 + getMonogram: function() { 45 + return 'F' + this.getID(); 46 + }, 47 + 48 + /** 49 + * Get the File page URI - like '/F123' 50 + */ 51 + getPageURI: function() { 52 + return '/' + this.getMonogram(); 53 + }, 54 + 41 55 setChunks: function(chunks) { 42 56 var chunk; 43 57 for (var ii = 0; ii < chunks.length; ii++) { ··· 101 115 102 116 switch (this.getStatus()) { 103 117 case 'done': 104 - var link = JX.$N('a', {href: this.getURI()}, 'F' + this.getID()); 118 + var link = JX.$N('a', {href: this.getPageURI()}, this.getMonogram()); 105 119 106 120 content = [ 107 121 JX.$N('strong', {}, ['Upload Complete (', link, ')']),