I'm using SharePoint Online and I'd like to know if it's possible to append a metadata column value to a filename when a user clicks "Download". The filename in SP must stay the same, but the locally downloaded version must be appended.

  • I also have the exact same requirement. Were you able to find a solution for this, if so can please share or give me guidance. Thank you Commented Oct 16, 2019 at 15:21

1 Answer 1


This is not possible out-of-the-box. But one solution could be to customize SharePoint with your own download link at the appropriate location. Use the HTML download attribute on an anchor tag. For example:

<a href="{SPURL}" download="{DownloadFilename}">download</a>

However, it will not work in all browsers. It works with Google Chrome and FireFox whereas Internet Explorer and Microsoft Edge will ignore it.

  • Thanks, but that won't work with the standard download link on libraries will it? I need a solution that works for all links without me having to edit the html each time. Plus, I don't know the filename - so a hard-coded approach won't suffice.
    – MrShoes
    Commented Feb 15, 2017 at 16:13
  • No, the standard download will use the filename only! You'll have to develop a custom solution. Maybe by registering some JavaScript code (through a CustomAction) that replaces the standard download link! The metadata to add can be retrieved from the web page if available or by a call back to SharePoint with the JSOM. Commented Feb 16, 2017 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.