本文介绍了Fine-uploader endpointer拒绝进入api控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了精细上传器的终点问题,它拒绝攻击api控制器。拖放后,它直接转到onSubmitted但不使用终点。请帮助我找不到的东西。



我尝试过:



I am having issues with the end point of fine uploader, it refuses to hit the api controller. After drag and drop it goes straight to onSubmitted but does not use end point. Please assist what am I missing.

What I have tried:

var galleryUploader = new qq.FineUploader({
        element: document.getElementById("fine-uploader-gallery"),
        template: 'qq-template-gallery',
        autoUpload: false,
        request: {
            endpoint: '/api/student/uploads/',
            params: {
                StudentNumber: StudentNumber
            }
        },
        thumbnails: {
            placeholders: {
                waitingPath: '/node_modules/fine-uploader/fine-uploader/placeholders/waiting-generic.png',
                notAvailablePath: '/node_modules/fine-uploader/fine-uploader/placeholders/not_available-generic.png'
            }
        },
        validation: {
            itemLimit: 2,
            allowedExtensions: ['jpeg', 'jpg', 'gif', 'png','pdf']
        },
        uploadSuccess: {



        },
        callbacks: {
            onSubmitted: function (id, name) {
                debugger;

            },
            onError: function (id, name, errorReason, xhrOrXdr) {
                debugger;

            },
            onUpload: function (id, name, isError, responseJSON) {
                debugger;

            },
            onComplete: function (id, fileId, responseJSON) {
                debugger;

            }
        },
        retry: { enableAuto: false }
    });







[HttpPost]
        [Route("api/student/uploads")]
        public async Task<object> UploadDoc(int StudentNumber)
        { 
        // needs to come here
        }

推荐答案


这篇关于Fine-uploader endpointer拒绝进入api控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 11:27