jQWidgets Forums

jQuery UI Widgets Forums ASP .NET MVC jqxFileUpload

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 8 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • jqxFileUpload #90972

    Manowar
    Participant

    Hello
    How can I apply this feature in my project? This code doesn’t work:

    <div class="row">
            <p class="col-sm-6">Загрузить:</p>
            <div class="col-sm-6" id="uploadImage">
                <jqx-file-upload width="300" browseTemplate="info" uploadTemplate="primary" cancelTemplate="danger" 
                                 accept="image/*" upload-url="@Url.Content("~/Food/UploadImage")" file-input-name="fileToUpload"></jqx-file-upload>
            </div>
        </div>
    

    Besides, I have to link uploaded files to some ID – how can I trasfer that ID to my controller via this widjet?
    Thanks

    jqxFileUpload #91025

    Peter Stoev
    Keymaster

    Hi Manowar,

    If the URL is correct, it will try to upload to that url. If it is not, it will do nothing. Unfortunately, we cannot know whether it is correct or not.
    Are you sure that you should not use URL.Action instead?

    Regards,
    Peter

    jQWidgets Team
    http://www.jqwidgets.com/

    jqxFileUpload #91028

    Manowar
    Participant

    Thanks for the reply, Peter, solved the first one
    What about this one:
    Besides, I have to link uploaded files to some ID – how can I trasfer that ID to my controller via this widjet?

    jqxFileUpload #91037

    Peter Stoev
    Keymaster

    Hi Manowar,

    When a file is being uploaded it calls your upload-url URL controller method so its basically .NET method in the controller and you have the data passed to it. Having the data as an argument you can pass it to another .NET code.

    Regards,
    Peter
    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.