Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use postData upload image tips me TypeError: self._form.on is not a function #334

Open
xulayen opened this issue Nov 27, 2019 · 0 comments

Comments

@xulayen
Copy link

xulayen commented Nov 27, 2019

TypeError: self._form.on is not a function

index.js:1375 TypeError: self._form.on is not a function
    at Request.push../node_modules/request/request.js.Request.form (request.js:1355)
    at Request.push../node_modules/request/request.js.Request.init (request.js:368)
    at Request.RP$initInterceptor [as init] (request2.js:36)
    at new Request (request.js:155)
    at request (index.js:58)
    at AsyncFunction.onForm (generator.js:90)
    at DisplayPhotosPages.UploadSubmit (index.js:218)
    at HTMLUnknownElement.callCallback (react-dom.development.js:337)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:386)
    at invokeGuardedCallback (react-dom.development.js:439)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:454)
    at executeDispatch (react-dom.development.js:585)
    at executeDispatchesInOrder (react-dom.development.js:610)
    at executeDispatchesAndRelease (react-dom.development.js:713)
    at executeDispatchesAndReleaseTopLevel (react-dom.development.js:722)
    at forEachAccumulated (react-dom.development.js:694)
    at runEventsInBatch (react-dom.development.js:739)
    at runExtractedPluginEventsInBatch (react-dom.development.js:881)
    at handleTopLevel (react-dom.development.js:5831)
    at batchedEventUpdates$1 (react-dom.development.js:24378)
    at batchedEventUpdates (react-dom.development.js:1414)
    at dispatchEventForPluginEventSystem (react-dom.development.js:5927)
    at attemptToDispatchEvent (react-dom.development.js:6044)
    at dispatchEvent (react-dom.development.js:5947)
    at unstable_runWithPriority (scheduler.development.js:701)
    at runWithPriority$2 (react-dom.development.js:12231)
    at discreteUpdates$1 (react-dom.development.js:24395)
    at discreteUpdates (react-dom.development.js:1439)
    at dispatchDiscreteEvent (react-dom.development.js:5914)
var __option = {
                url: option.url,
                method: method,
                contenttype: "multipart/form-data",
                headers: {
                    //"content-type": "multipart/form-data",
                    "ddroasess": cookieManager.getCookie('ddroasess')
                },
                formData: {
                     Area1Id: region[0],
                     Area2Id: region[1],
                     Area3Id: region[2],
                     storeName: photoStore.storeName,
                     StoreId: storeid && storeid[0],
                     customBufferFile: [{
                          value: photoStore.storeImg,
                          options: {
                              filename: 'll.png',
                              contentType: 'image/jpeg'
                    }
                }]
            }
            }


       return rp(__option)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant