
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
uniorg-attach
Advanced tools
uniorg-attachuniorg plugin to convert attachment: links to file: links.
npm install --save uniorg-attach
If we have the following example.org file:
:PROPERTIES:
:ID: eae6a180-58d3-44b9-9c95-d8924849d365
:END:
attachment:file.txt
and
import { unified } from 'unified';
import toVFile from 'to-vfile';
import uniorgParse from 'uniorg-parse';
import { uniorgAttach } from 'uniorg-attach';
import uniorg2rehype from 'uniorg-rehype';
import html from 'rehype-stringify';
unified()
.use(uniorgParse)
.use(uniorgAttach)
.use(uniorg2rehype)
.use(html)
.process(toVFile.readSync('./example.org'), function (err, file) {
console.log(file.toString());
});
will output
<p><a href="file:data/ea/e6a180-58d3-44b9-9c95-d8924849d365/file.txt">file:data/ea/e6a180-58d3-44b9-9c95-d8924849d365/file.txt</a>
</p>
idDirType: string?
Default: "data/"
The directory where attachments are stored. If this is a relative path, it will be interpreted relative to the directory where the Org file lives.
Corresponds to org-attach-id-dir in Emacs.
useInheritanceType: boolean?
Default: false
NOTE: In Emacs, the default is
'selectivewhich means that Emacs will look atorg-use-property-inheritanceto check whetherIDandDIRproperties are inherited. uniorg-attach does not currently do that. This shouldn’t cause any troubles unless you inherit one property but not the other.
Attachment inheritance for the outline.
Enabling inheritance for implies that attachment links will look through all parent headings until it finds the linked attachment.
Corresponds to org-attach-use-inheritance in Emacs.
idToPathType: (id: string) => string
Default: idUuidFolderFormat
A function parsing an ID string into a folder-path.
Similar to org-attach-id-to-path-function-list in Emacs, but only allows one function.
This module exports idUuidFolderFormat and idTsFolderFormat that re-implement two common behaviors for org-attach.
FAQs
Uniorg plugin to process org-attach attachment links
We found that uniorg-attach demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.