pqina / react-filepond

🔌 A handy FilePond adapter component for React
https://pqina.nl/filepond
MIT License
1.85k stars 90 forks source link

FilePond Error Upload on Linux #117

Closed AliYmn closed 4 years ago

AliYmn commented 5 years ago

Hi, filepond upload doesn't work on linux. When i was upload file on chrome on linux, my post object is empty. I can't fix it. But, other platform is working as well.

NOT : File type is .stl format

my backend error details : https://sentry.io/share/issue/ec8a33676ed6469d9e8310719b48565b/

<FilePond
acceptedFileTypes={['model/*', 'application/vnd.ms-pki.stl', 'application/vnd.ms-pkistl', 'model/x.stl-binary', 'application/sla', 'application/x-navistyle']}
fileValidateTypeDetectType={
    (source, type) => new Promise((resolve, reject) => {
        if (type === '') {
            return resolve('model/x.stl-binary');
        }
        else {
            if (type === '') {
                reject(type)
            }
            else {
                resolve(type)
            }
        }
    })
}
server={
    {
        url: '/api/v1/case/impression/upload/' + t.props.match.params.id + '/?name=lowerjawstl',
        process: {
            method: "POST",
            headers: {
                Authorization: localStorage.getItem('token'),
                'X-CSRFToken': $.cookie('csrftoken'),
            },
        },
        revert: null
    }
} />

Can you help me to fix them? Thank you ...

rikschennink commented 5 years ago

I advise to make a small test case (without custom code), for instance, try with the PHP boilerplate project and see if that works.

Also, you can use chrome dev tools to inspect the POST request and see if the file object is in it.

AliYmn commented 5 years ago

@rikschennink i tryed but it worked my computer ( MacOs Majove). But elementry os on chrome also windows 7 chrome this not worked. What do you think the problem may be, what should I check?

rikschennink commented 5 years ago

@AliYmn You should check:

Also, you can use chrome dev tools to inspect the POST request and see if the file object is in it.