Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2869466
D25134.1736707022.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25134.1736707022.diff
View Options
diff --git a/webroot/rsrc/js/core/behavior-drag-and-drop-textarea.js b/webroot/rsrc/js/core/behavior-drag-and-drop-textarea.js
--- a/webroot/rsrc/js/core/behavior-drag-and-drop-textarea.js
+++ b/webroot/rsrc/js/core/behavior-drag-and-drop-textarea.js
@@ -27,11 +27,15 @@
drop.listen('didUpload', function(file) {
JX.TextAreaUtils.insertFileReference(target, file);
- var metadata = new JX.RemarkupMetadata(config.remarkupMetadataValue,
- config.remarkupMetadataID);
- var phids = metadata.getMetadata('attachedFilePHIDs', []);
- phids.push(file.getPHID());
- metadata.setMetadata('attachedFilePHIDs', phids);
+ if(config.remarkupMetadataID) {
+ // Try to auto-attach files by default
+ // https://we.phorge.it/T15106
+ var metadata = new JX.RemarkupMetadata(config.remarkupMetadataValue,
+ config.remarkupMetadataID);
+ var phids = metadata.getMetadata('attachedFilePHIDs', []);
+ phids.push(file.getPHID());
+ metadata.setMetadata('attachedFilePHIDs', phids);
+ }
});
drop.start();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 18:37 (5 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1108705
Default Alt Text
D25134.1736707022.diff (1 KB)
Attached To
Mode
D25134: Drag & Drop: fix JavaScript error related to JX.$(undefined)
Attached
Detach File
Event Timeline
Log In to Comment