by dan
27. April 2009 19:26
Every now and then former AxCMS.net developer training attendees are confronted with the task of mass document upload. In most cases this task comes with migration project finalization. This time it has been a member of A EINS IT GmbH, a brand new partner to the Axinom family that wanted to know how to do.
So, how do we realize mass document upload? In view of the large quantity of methods (namely WSS, WebDAV, etc..) I will dicuss something that ships with the AxCMS.net 8.5 Premium Template Project and fits me most: Doing mass document upload programmatically!
Everything we need to accomplish this task is inside the Create_PremiumSample Project. The base class used is the Axinom.AECMS.Import.DocumentImporter class. Inside the PremiumSampleApplication.cs we find the following method:
2: public void ImportDocuments(string xmlDocumentName, string pathToDocuments)
3: {
4: DocumentImporter documentImporter = new DocumentImporter(_cmsSite, _categoryTree, new AxUser(_defaultUser, "axinom"));
5: MessageCollection messages = documentImporter.Import(