Apr 11 2018 06:30 AM
Apr 11 2018 06:30 AM
Within one of our modern teamsites we have a document library with custom content types, one of which we have made default for the library.
When uploading certian word files from our share drives these do not get assigned the default content type, but another.
Just to note that these documents where created outside of sharepoint so they would not have the other custom content type attached to them in anyway.
Apr 11 2018 11:51 AM
It doesn't work like that. Setting the Default Content type for a library simply means that when clicking the New menu option in the library you will create a document using that content type - without needing to choose it from the dropdown (you might have defined multiple content types for the library. Also this applies to a classic library where you choose New from the ribbon, in a modern library clicking New simply activates the dropdown)
Uploading a document will not assign your default content type, it's there for file creation only.
Apr 17 2018 01:16 AM
@Ian Moran Thanks for the clarification. So apart from scripting is there anyway to assign a default content type to a library when files and uploaded/copied? Cheers
Apr 17 2018 01:48 AM
AFAIK, this is not possible OOTB .
An alternative way to upload items with a specific Content Type is to use 3rd party tools. They allow selection of Content Types, assigning default metadata values, retain original modification date of documents, ...
Paul | SLIM Applications
Apr 17 2018 02:27 AM
Not as far as I know. You *might* be able to do it with a Flow but it's been a while since I looked at Flow capabilities.
Apr 17 2018 02:45 AM
So when uploading/copying to a library with multiple content types does SP assign a CT at random each time? or is there some logic. Cheers
Apr 17 2018 05:42 AM
Interesting. In my SharePoint Online environment with multiple document and folder CTs I observe the following behaviour.
- if the default CT (= the first CT) is a document CT then Drag-and-drop will associate that CT with the new document.
- if the default CT is a folder CT (e.g. document set) the document after drag-and-drop is associated with the 1st document CT in the CT list.
Ergo, you are able to set a default CT for documents. Simply make sure it is the first "document" CT in the CT list.
Apr 19 2018 06:32 AM
@Paul de Jong I have tried your suggestion but with mixed results. Some documents if I upload get the default CT (the 1st one) others get a different one. Also, if I copy a group of documents from another SP site (with no custom CT's) to the library with my custom CT's it does not apply the default CT. Strange indeed.
Apr 19 2018 07:09 AM
Hi Damien one way we have worked around this is to have different libraries for different content type uploads and then workflows to copy or move those files to the library you really want them at. To setup:
Any questions let me know or feel free to reach out to my company that specializes in these things. https://www.eswcompany.com
Oct 06 2019 08:17 PM
@Ian Moran I beg to differ. Uploading documents to a document library will apply the default content type to the uploaded documents. The default content type is NOT just for the GUI New button.