Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

I'm from a web forms background and learning angular with web API in C# and I have working site for adding/editing and deleting an object record. I know want to move on to more complex problems but struggling to know where to start!

The nearest I've found is this post which seems quite good but limited to images but struggling to follow as its a bit confusing knowing which responses work. AngularJS .Net WebAPI Upload image and save to database (MSSQL).

What I would like to do very simply is have an Object with properties Name (string) and Logo (Logo stored in db binary field). From and angular view save the object (calling route of my Web API) including validating the name and saving an image and if it already has one, display the current image.

If anyone knows of a good simple example that will achieve that and ideally will work for any kind of file as some uploads in my site might be PDFs for example I would be hugely grateful.

share|improve this question
up vote 4 down vote accepted

I've used ng-file-upload in quite a few Angular projects with no problems. It has comprehensive documentation and many examples to get you started.

The have recipes for the server side stuff too, here is one for .NET

This answer will help on the controller side in terms of getting the uploaded files into a byte array that you can then insert into the database of your choice.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.