Open gooof opened 6 years ago
Solved. Uppy endpoint was not a absolute path.
@ifedapoolarewaju I wonder if we'd want to support relative paths? (not advocating or anything, honest question, it might be too magical and a source of more support tickets). And if we don't, if we should raise a clear error when a relative path is used?
I'm not sure what Uppy endpoint
means in this case actually. Do we mean Uppy endpoint as in Upload target? Or endpoint as in uppy client? @gooof could you please clarify?
I meant the uppy client XHRUpload endpoint
wrong: Uppy.XHRUpload endpoint: '../upload.php?a=1&s=9bfc99e'
right: Uppy.XHRUpload endpoint: 'https://example.com/upload.php?a=1&s=9bfc99e'
var uppy = new Uppy.Core({
...
})
uppy.use(Uppy.Dashboard, { target: '.upload-area' })
uppy.use(Uppy.Dropbox, { target: Uppy.Dashboard, serverUrl: 'https://up.example.com' })
uppy.use(Uppy.GoogleDrive, { target: Uppy.Dashboard, serverUrl: 'https://up.example.com' })
uppy.use(Uppy.ProgressBar, { target: Uppy.Dashboard })
uppy.use(Uppy.XHRUpload, {
endpoint: '{UPLOAD_URL}',
getResponseError (responseText, xhr) { return new Error(JSON.parse(responseText).message) }
})
But I reopen this, because it is possible to break up "uppy server" remotely. That should be fixed.
I've setup uppy-server for image uploading from google drive, dropbox &co, and is working great until the upload. I choose a file and click on "select", the thumbnails comes correctly up. But when I click on "Upload files" uppy-server quits with a TypeError.