Good day to all. The question is the following: I need to send some photos asynchronously to the server, save them in the server directory in the directory and return the same photos to the client. The problem is that Ajax.BeginForm() not suitable for asynchronous file transfer, here is my question on this: "Click" . Tell me how to do this? Here is my form that sends data not asynchronously.
@using (Html.BeginForm("PhotoSessionInfo", "Home", FormMethod.Post, new { enctype = "multipart/form-data" })) { <span>Название фотосесии (будет отображаться в галереи): </span> <br /> @Html.TextBox("sessionName", null, new { @class = "sessionName" }) <br /> <br /> <span>Выберите изображение, которое будет являться заставкой фотосесии: </span> <br /> <div id="dropZoneForGeneral"> Перетащите файл сюда или <input value="выберите файл" id="GeneralPhoto" type="file" name="generalPhoto" accept=".jpg, .jpeg, .png"> </div> <br /> <br /> <span>Выберите изображения: </span> <br /> <div id="dropZone"> Перетащите файл сюда или <input value="выберите файлы" multiple type="file" name="photos" accept=".jpg, .jpeg, .png"> </div> <button type="submit" id="submit"> Отправить </button> }