We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Ejs-uploader not working on ipad, iphone devices


can't upload files in asp.net core app on ipad and iphone devices in any browser. 

I'm using Ejs-uploader and it doesn't seem to work properly in this case.

5 Replies 1 reply marked as answer

SP Sureshkumar P Syncfusion Team December 19, 2022 11:13 AM UTC

Hi Dimitris,

When validating the reported requirement on iPhone and iPad devices the reported issue was not replicated on our end. the validated video demonstration is attached on the attachment.

If still you have faced the issue, then revert us with the below details.

  1. Share the uploader component rendering code example

  2. If possible, share the uploader component issue replicating the sample

  3. Share your exact Syncfusion package version.

These details will help us to provide an exact solution as earlier as possible.


Sureshkumar P

DI Dimitris December 20, 2022 09:56 AM UTC


we have a multipart form data in which one of the elements is the uploader:


 <form enctype="multipart/form-data" asp-action="Update" autocomplete="off">
        <div class="container">
            <div class="d-flex justify-content-end">
                <ejs-button id="saveTestTp" type="submit" cssClass="vio-form-primary">
                        <i class="fas fa-save"></i>  Save
                <ejs-button id="deleteTestTp" type="button" cssClass="vio-form-danger ml-3">
                        <i class="fas fa-trash"></i>  Delete
            <div asp-validation-summary="All" class="text-danger"></div>

                <div class="form-group">

                    @for (int i = 0; i < Model.TestExistingImages.Count; i++)
                        <input type="hidden" asp-for="@Model.TestExistingImages[i].FileName" />
                        <input type="hidden" asp-for="@Model.TestExistingImages[i].Id" />
                        <div class="row">
                            <div class="offset-md-3 col-md-9">
                                <div class="d-flex flex-row">
                                    <a rel='nofollow' href="@(Url.Content($"~/Content/{Model.UserName}/Tests/Images/" + (Model.TestExistingImages[i].FileName ?? "")))" target="_blank" class="mr-3">Photo</a>
                                    <div class="custom-control custom-checkbox">
                                        <input asp-for="@Model.TestExistingImages[i].ImageDeleted" type="checkbox" class="custom-control-input form-control-sm" />
                                        <label asp-for="@Model.TestExistingImages[i].ImageDeleted" class="custom-control-label col-form-label-sm custom-check-label">Delete Photo</label>

                    <div class="row">
                        <label asp-for="Images" class="col-md-3 col-form-label-sm"></label>
                        <div class="col-md-9 mb-4">
                            <ejs-uploader id="Images" autoUpload="false" multiple="true" maxFileSize="8 * 1024 * 1024" allowedExtensions=".png, .jpg, .jpeg, .jfif, .tiff"> </ejs-uploader>

Also this is the code inside the Update controller method about the uploader:

                        foreach (var file in model.Images)

                            if (file.Length > 0 && file.ContentType.Contains("image"))
                                if (file.Length > 8 * 1024 * 1024) // 8MB
                                    ModelState.AddModelError("", "Το αρχείο δεν πρέπει να ξεπερνάει τα 8MB");
                                    PopulateModel(ref model, test);
                                    return View(model);

                                // Get unique filename for upload
                                string uploadFilename = FilesHelper.GetTestFileName(test.VisitId, test.Id, file.FileName);

                                string uploadsFolder = Path.Combine(hostingEnv.WebRootPath, @$"Content\{vetname}\Tests\Images");
                                string filePath = Path.Combine(uploadsFolder, uploadFilename);
                                using (FileStream fs = System.IO.File.Create(filePath))
                                    await file.CopyToAsync(fs);

                                TestFiles testFile = new TestFiles();
                                testFile.FileName = uploadFilename;
                                testFile.TestId = test.Id;
                                testFile.Type = "img";
                                await testFilesRepository.AddAsync(testFile);

The syncfusion version is

As I said before uploader isn't working only on iOS devices.

Thank you in advance

SP Sureshkumar P Syncfusion Team December 21, 2022 10:27 AM UTC

Dimitris, we have already fixed the issue in our 20.1.56 version onwards. We request you update the NuGet to the latest version to get rid of this issue.

Find the sample for the issue with the latest version in the attachment:

Attachment: webapp1_1f99e9f.zip

DI Dimitris December 24, 2022 06:26 AM UTC

Good morning,

Thank you for your prompt replies BUT your sample does NOT work on MacOS, Safari 16.1 (17614., 17614). Your sample is using Syncfusion.EJ2.AspNet.Core version and still, when run, the collection of files posted to the controller is null. 

Here is the controller code:

public async Task<IActionResult> Index(UpdateTestViewModel model)
    string uploadsFolder = Path.Combine(hostingEnv.WebRootPath, @$"Content\Tests\Images");
    foreach (var fileToUpload in model.Images)
        string filePath = Path.Combine(uploadsFolder, fileToUpload.FileName);
        using (FileStream fs = System.IO.File.Create(filePath))
            await fileToUpload.CopyToAsync(fs);
    return View(model);

The above code works fine on Windows (Chrome browser). But on Safari, the error is:

  Message=Object reference not set to an instance of an object.
   at webapp1.Controllers.HomeController.<Index>d__4.MoveNext() in HomeController.cs:line 36

Line 36 is: 

foreach (var fileToUpload in model.Images)

model.Images is null.

Any ideas?

Thank you very much in advance,

SP Sureshkumar P Syncfusion Team December 27, 2022 09:28 AM UTC

Dimitris, after validating the requirement on the latest updated sample, the sample has old version scripts. After updating the latest version scripts in the _Layout.cshtml page the reported issue does not occur.

Find the screenshot here:

Find the latest updated sample in the attachment:

Find the latest updated scripts in _Layout.cshtml:

<link rel="stylesheet" rel='nofollow' href="https://cdn.syncfusion.com/ej2/20.4.38/fabric.css"

          asp-fallback-rel='nofollow' href="~/css/ej2/fabric.css"




          asp-suppress-fallback-integrity="true" />


    <script src="https://cdn.syncfusion.com/ej2/20.4.38/dist/ej2.min.js"




Attachment: webapp1_cedc209d.zip

Marked as answer
Live Chat Icon For mobile
Up arrow icon