Getting link of uploaded file in List/Library control


How can we obtain the direct link to the file when files are uploaded into the "Uploaded Documents Library" using the list/library control and update a hyperlink field in their called "File Link" once the file has been uploaded?


Hello @stormanh,

You can update the metadata of uploaded documents using PnPjs library. Please find the example here.

The direct link to the document would be:
https://{Domain Name}{Site Name}/{Sub-Site Name}/{Document Library Name}/{Document Name with extension}

For instance:

Thanks @mnikitina! So there is no JS property to quickly obtain the link of the uploaded file? We need to assemble it ourselves?

Hello @stormanh,

When uploading a file, the control only returns its ID. You can get other properties like file name and extension using the PnPjs library.