0

I dont find any tutorials on how to upload folder and its contents to rest web service using c#? The content-type is application/json. Is there any way to do this?

tennisno1
  • 7
  • 4
  • So, you know how to upload files and wanted to upload folders? – SᴇM Apr 17 '18 at 05:17
  • Yes. I tried uploading zip files but that did not work..Is it because of the content-type being application/json? – tennisno1 Apr 17 '18 at 05:23
  • You can [check, whether your source file is a directory or a file](https://stackoverflow.com/questions/1395205/better-way-to-check-if-a-path-is-a-file-or-a-directory), then if it's directory, create directory with its name (on the server) and upload its content into it. – SᴇM Apr 17 '18 at 05:56

0 Answers0