Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC - Upload a file with SignalR

I want to upload a file from the client to the server. Is there a way to upload a file with SignalR or must i need a Controller for this?

like image 248
Kaffee Bohne Avatar asked Apr 03 '12 19:04

Kaffee Bohne


People also ask

How can upload file in ASP.NET MVC?

Uploading a file in Asp.Net MVC application is very easy. The posted file is automatically available as a HttpPostedFileBase parameters in the action of the controller. For uploading a file on the server you required to have a file input control within html form having encoding type set to multipart/form-data.

Do people still use SignalR?

SignalR is relevant for now, it supports mobile devices, and many other things. SignalR is the same WebSocket but with many ready stuff. You can use raw WebSocket instead of it, but you will have to do many things to gain what you want. So SignalR is more easy to use.

Does SignalR require WebSockets?

SignalR and WebSocketSignalR uses the new WebSocket transport where available and falls back to older transports where necessary. While you could certainly write your app using WebSocket directly, using SignalR means that a lot of the extra functionality you would need to implement is already done for you.


1 Answers

SignalR is for real time messaging not uploading files.

like image 200
davidfowl Avatar answered Oct 16 '22 17:10

davidfowl