-2

I am trying to upload an image from my computer to hosting server using ASP.NET code, but I don't know if it's possible.

If it is, can you help me?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Sorry, but neither do we. You've given zero detail about the hosting server, environment image type. You've thrown us a heap of what seems irrelevant tags with no explanation – Hursey Sep 04 '22 at 20:34
  • 1
    Also, there is a gazillion examples on how to up load a file. Easy to do. However, "automatic"? Nope, not possible. If I visit your web site, then you CAN NOT start messing around and grabbing files on my computer!!! In fact, even while you looking at THIS site, do you think it can and could go grab your files called "my banking". Or how about all your pictures? Or how about a file called my-passwords? In fact, if the internet and web browsers could steal and grab files from my computer? No one would trust and use the internet. Users HAVE to select a file - your code can't. – Albert D. Kallal Sep 04 '22 at 21:30

1 Answers1

0

Sure it's possible. Read up on how the FileUpload class works: https://learn.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.fileupload?view=netframework-4.8

It won't be an automatic upload like you ask in the title, but you will be able to send files thru the browser and wherever you want them to go.

Pedro Vera
  • 41
  • 3