Esempio n. 1
0
        /// <summary>
        /// Method to get file upload directory
        /// </summary>
        /// <param name="fileType">file type</param>
        /// <returns>returns file directory</returns>
        public static string GetUploadDirectory(AspectEnums.ImageFileTypes fileType)
        {
            string fileDirectory = HttpContext.Current.Server.MapPath("Contents");

            switch (fileType)
            {
            case AspectEnums.ImageFileTypes.Survey:
                fileDirectory = fileDirectory + @"\User";
                break;

            case AspectEnums.ImageFileTypes.User:
                fileDirectory = fileDirectory + @"\UserFiles\";
                break;

            case AspectEnums.ImageFileTypes.Store:
                fileDirectory = fileDirectory + @"\StoreFiles";
                break;

            case AspectEnums.ImageFileTypes.General:
                fileDirectory = fileDirectory + @"\GeneralFiles";
                break;

            case AspectEnums.ImageFileTypes.DealerCreation:
                fileDirectory = fileDirectory + @"\DealerCreation";
                break;

            case AspectEnums.ImageFileTypes.Expense:
                fileDirectory = fileDirectory + @"\ExpenseFiles";
                break;
            }
            return(fileDirectory);
        }
Esempio n. 2
0
        /// <summary>
        /// Method to get server image file name
        /// </summary>
        /// <param name="imageFileName">image file name</param>
        /// <param name="imageType">image type</param>
        /// <returns>returns fully qualified image url</returns>
        public static string GetServerMobileImages(string imageFileName, AspectEnums.ImageFileTypes imageType)
        {
            string hostName = GetAppSettings(AspectEnums.ConfigKeys.HostName);
            string rawURL   = GetAppSettings(AspectEnums.ConfigKeys.FileProcessorURL);

            return(String.Format(rawURL, hostName, imageFileName, "&", imageType.ToString()));
        }
Esempio n. 3
0
        /// <summary>
        /// Method to get file upload directory
        /// </summary>
        /// <param name="fileType">file type</param>
        /// <returns>returns file directory</returns>
        public static string GetUploadDirectory(AspectEnums.ImageFileTypes fileType, string fileDirectory)
        {
            switch (fileType)
            {
            case AspectEnums.ImageFileTypes.Survey:
                fileDirectory = fileDirectory + @"\User";
                break;

            case AspectEnums.ImageFileTypes.User:
                fileDirectory = fileDirectory + @"\UserFiles\";
                break;

            case AspectEnums.ImageFileTypes.Store:
                fileDirectory = fileDirectory + @"\StoreFiles";
                break;

            case AspectEnums.ImageFileTypes.General:
                fileDirectory = fileDirectory + @"\GeneralFiles";
                break;

            case AspectEnums.ImageFileTypes.DealerCreation:
                fileDirectory = fileDirectory + @"\DealerCreation";
                break;

            case AspectEnums.ImageFileTypes.Expense:
                fileDirectory = fileDirectory + @"\ExpenseFiles";
                break;
            }
            return(fileDirectory);
        }
Esempio n. 4
0
        /// <summary>
        /// Method to get server image file path (Absulute Path of .jpeg file)
        /// </summary>
        /// <param name="imageFileName">image file name</param>
        /// <param name="imageType">image type</param>
        /// <returns>returns fully qualified image url</returns>
        public static string GetServerMobileImagePath(string imageFileName, AspectEnums.ImageFileTypes imageType)
        {
            string fileDirectory = GetAppSettings(AspectEnums.ConfigKeys.ImagesPath);

            switch (imageType)
            {
            case AspectEnums.ImageFileTypes.Survey:
                fileDirectory = fileDirectory + @"SDImages/";
                break;

            case AspectEnums.ImageFileTypes.User:
                fileDirectory = fileDirectory + @"UserFiles/";
                break;

            case AspectEnums.ImageFileTypes.Store:
                fileDirectory = fileDirectory + @"StoreFiles/";
                break;

            case AspectEnums.ImageFileTypes.General:
                fileDirectory = fileDirectory + @"GeneralFiles/";
                break;
            }
            return(fileDirectory + imageFileName);
        }