Hello everyone!
I’m kind of new with uppy but I’m having lots of troubles with plugging Companion into my node js server. In the explanations you use localhost and it works fine but when I try to replace it with my domain name I get “WebSocket connection to ‘wss://domainName.com/api/8ae313e6-7bdf-44d3-afa5-0d36a1d52f5b’ failed: Error during WebSocket handshake: Unexpected response code: 520”.
In my node server I have: server: {
host: ‘domain.com’,
protocol: ‘https’
},
and in my client:
const uppy = Uppy.Core({debug: true, autoProceed: true})
// uppy.use(Uppy.FileInput, { target: ‘.UppyForm’, replaceTargetContent: true })
.use(Uppy.XHRUpload, {
endpoint: ‘https://domain.com/uploads/files’,
formData: true,
fieldName: ‘files’,
method: ‘post’,
id: ‘XHRUpload’,
}
headers: {
contentType: ‘image/png’
}
})
.use(Uppy.ProgressBar, {
target: ‘body’,
fixed: true,
hideAfterFinish: false
})
.use(Uppy.Dashboard, { trigger: ‘#uppyModalOpener’,
replaceTargetContent: true,
showProgressDetails: true,
width: 2000,
height: 700,
browserBackButtonClose: true,
inline: true,
showLinkToFileUploadResult: true,
hideUploadButton: false,
hideRetryButton: false,
hidePauseResumeButton: false,
hideCancelButton: false,
hideProgressAfterFinish: false,
closeAfterFinish: false,
disableStatusBar: false,
disableInformer: false,
disableThumbnailGenerator: false,
disablePageScrollWhenModalOpen: true,
animateOpenClose: true,
proudlyDisplayPoweredByUppy: false,
})
.use(Uppy.Instagram, { target: Uppy.Dashboard, companionUrl: 'https://*domain*.com',endpoint: 'https://*domain*.com/uploads/files'})
.use(Uppy.Dropbox, { target: Uppy.Dashboard, companionUrl: 'https://*domain*.com',endpoint: 'https://*domain*.com/uploads/files'})
.use(Uppy.GoogleDrive, { target: Uppy.Dashboard, companionUrl: 'https://*domain*.com',endpoint: 'https://*domain*.com/uploads/files' });
please help me, Thank you!