public void InitializeFiles(ConfigurationPart part, IDictionary<string, string> query) {
     _filesCreated.Clear();
     if (query.ContainsKey("InputFile") && part.RequiresInputFile() == true)
         InitializeFile(part, query, "InputFile");
     if (query.ContainsKey("OutputFile") && part.RequiresOutputFile() == true)
         InitializeFile(part, query, "OutputFile");
 }
Exemplo n.º 2
0
 public void InitializeFiles(ConfigurationPart part, IDictionary <string, string> query)
 {
     _filesCreated.Clear();
     if (query.ContainsKey("InputFile") && part.RequiresInputFile() == true)
     {
         InitializeFile(part, query, "InputFile");
     }
     if (query.ContainsKey("OutputFile") && part.RequiresOutputFile() == true)
     {
         InitializeFile(part, query, "OutputFile");
     }
 }
Exemplo n.º 3
0
        private void HandleInputFile(ConfigurationPart part, IDictionary <string, string> query)
        {
            if (Request.Files == null || Request.Files.Count <= 0 || part.RequiresInputFile() != true)
            {
                return;
            }

            var input = Request.Files.Get(0);

            if (input == null || input.ContentLength <= 0)
            {
                return;
            }

            var filePart = _fileService.Upload(input);

            query["InputFile"] = filePart.Id.ToString(CultureInfo.InvariantCulture);
        }
        private void HandleInputFile(ConfigurationPart part, IDictionary<string, string> query) {
            if (Request.Files == null || Request.Files.Count <= 0 || part.RequiresInputFile() != true)
                return;

            var input = Request.Files.Get(0);

            if (input == null || input.ContentLength <= 0)
                return;

            var filePart = _fileService.Upload(input);
            query["InputFile"] = filePart.Id.ToString(CultureInfo.InvariantCulture);
        }