Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

File upload with Jquery + AppService #6166


User avatar
0
sbenfares created

Is it possible to have an example of file uploading in a form using Application Service Layer ?

I have a form with an input type=file, and in my jquery file :

` // My Application Service var candidatService = abp.services.app.candidat;

// Form submission $formInscription.submit(function (e) { e.preventDefault();

        if (!$formInscription.valid()) {
            return;
        }

        var formData = $formInscription.serializeFormToObject();

        // Call Service
        candidatService.register(formData)
            .done(function () {
                window.location.href = "/confirmation-inscription-candidat";
            });
    });

`

How can i retrieve my file in the candidatService ?

What should my inputDto be ?

I can't access the Request for getting the file...

Thanks :)


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    see: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4082#issuecomment-447229316 https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4086

  • User Avatar
    0
    sbenfares created

    Thanks