Where are attachments stored in a SharePoint list?
10,465
As far as accessing them via the APIs, they are stored as part of the list item. Physically, they are stored in a SQL table.
List attachments are accessible via the various APIs including REST web service calls.
A few examples:
Get a list of attachments:
http://yourServer/yourSite/_api/web/lists/getbytitle('Tasks')/Items/GetById(7)/AttachmentFiles
Info about a single attachment:
http://yourServer/yourSite/_api/web/lists/getbytitle('Tasks')/Items/GetById(7)/AttachmentFiles('SomeDocument.docx')
You can upload, download and delete files via direct URLs and web services.
Author by
Ramanujan Taylor
Updated on June 04, 2022Comments
-
Ramanujan Taylor almost 2 years
I have a list in Sharepoint where one can add attachments, like this:
The problem I have is that I don't know where exactly Sharepoint stores these attachments because I didn't have to create a column for attachments.
I want to write a webpart in Vue.js where I can either access these attachments or manually add attachments.
Does anyone know where the attachments of the list are stored?
-
Penanghill over 2 yearsIs it possible to navigate to these attachments via the Files directory in a web browser?
-
Mike Smith - MCT over 2 yearsWhat do you mean by "Files directory in a web browser"? These files are accessible by URL, so you can share/use a direct link to them if you are already logged into SharePoint.
-
Penanghill over 2 yearsI mean being able to navigate to a location in SharePoint via the information architecture to the files. What path would you take to locate the files?
-
user1063287 over 2 yearsI am also looking for the directory where the list attachments are saved - I can see this is the URL to an individual attachment:
https://tenant.sharepoint.com/sites/msteams_MyTeamName/Lists/Some%20List%20Name/Attachments/1700/20200616_Yadda_Yadda.pdf?web=1
, but there doesn't seem to be a directory available at:https://tenant.sharepoint.com/sites/msteams_MyTeamName/Lists/Some%20List%20Name/Attachments/
. -
Mike Smith - MCT over 2 yearsSharePoint stores all files in a SQL Server database. While libraries can be browsed as if they were directories, attachments cannot. Attachments are associated with a list item and each list item can have zero to many attachments. The list items are the focus of lists, not the attachments. If the document is important by itself then store it in a library (maybe a library that is used just with that list) and add a hyperlink column to the SharePoint list. Those documents would then be browsable.