1

How can I upload my Image in asp.net core 2 without saved to database and after will show it in other View? Help, please.

Serhii Chyzhyk
  • 108
  • 2
  • 13

1 Answers1

0

Basically you can do like this, :

  1. Upload your image to a folder, not a database. Check here
  2. Save the url of the image to database, basically it is not different from anything saving at database.
  3. Give the url that you saved as source in your view.

for each steps you can find enough example in internet.

nzrytmn
  • 6,193
  • 1
  • 41
  • 38
  • Ok, understood. Can I, for example, write image to session or not? – Serhii Chyzhyk Aug 20 '19 at 13:03
  • @СергейЧижик You don't need to write to session whole image; but if you want you can write the url after you saved image to a folder. but i don't think you need this better you get the url at your dataset. If it solved your problem can you please vote my answer and check as right answer. – nzrytmn Aug 20 '19 at 13:06