Re: Additional process after upload

  •  02-25-2009, 1:00 AM

    Re: Additional process after upload

    Hi cutechat,
     
    Here's the code I've been working on
     
     protected void InputFile_FileValidating(object sender, UploaderEventArgs args)
        {

         
            DSOFile.OleDocumentProperties oleDocument = new DSOFile.OleDocumentProperties();
            DSOFile.SummaryProperties summaryProperties = default(DSOFile.SummaryProperties);
            string postedfile = "C:\\backups\\Projects\\CMS\\Uploads\\" + args.FileName.ToString();

            oleDocument.Open(postedfile, true, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess);

            summaryProperties = oleDocument.SummaryProperties;
            if (string.IsNullOrEmpty(summaryProperties.Title) | string.IsNullOrEmpty(summaryProperties.Author))
            {
           
                args.Delete();
                throw new ArgumentException("No Properties Found");
            }
            else
            {

            }

            oleDocument.Close(false);
        }

    I got an error that says "The name is not valid". I think that the file is not yet on the "Upload" folder. Any help is appreciated :)
View Complete Thread