title: file storage .net core
body: <p>i'm using a folder inside my project to upload files .</p>
  
  <pre><code>[HttpPost, DisableRequestSizeLimit]
  public IActionResult Upload()
  {
      try
      {
          var file = Request.Form.Files[0];
          var folderName = Path.Combine("Resources", "Images");
          var pathToSave = Path.Combine(Directory.GetCurrentDirectory(), folderName);
  
          if (file.Length &gt; 0)
          {
              var fileName = ContentDispositionHeaderValue.Parse(file.ContentDisposition).FileName.Trim('"');
              var fullPath = Path.Combine(pathToSave, fileName);
              var dbPath = Path.Combine(folderName, fileName);
  
              using (var stream = new FileStream(fullPath, FileMode.Create))
              {
                  file.CopyTo(stream);
              }
  
              return Ok(new { dbPath });
          }
          else
          {
              return BadRequest();
          }
      }
      catch (Exception ex)
      {
          return StatusCode(500, $"Internal server error: {ex}");
      }
  }
  </code></pre>
  
  <p>i was wondering if there's a risk to lose this files when we have new update for the customer .
  if there's a better solution for upload file and getting file link afterwards with .net core please let me know :) </p>