Giter Club home page Giter Club logo

Comments (4)

yoavniran avatar yoavniran commented on June 12, 2024

Hello @hafijAsadMVN
Please check the network tab in the dev tools of your browser. I doubt that the file isnt being sent, after all, thats the whole point of Uploady :)

If it is being sent then you'd need to check/debug your server implementation. Notice that you use chunked uploads, so you need to ensure your server supports those.

I've played with chat-gpt a few times trying to see what it knows about Uploady, what I've seen isnt very ensuring. In other words, I wouldnt trust how it thinks Uploady should be used. It normally makes up stuff that doesnt exist in the API.

For example, you really dont need to specifiy the file as part of the params. The file is sent using FormData and that's done automatically by Uploady's internals.

from react-uploady.

hafijAsadMVN avatar hafijAsadMVN commented on June 12, 2024

Thanks for your quick response, my mistake, actually with the mentioned code of ChunkedUploady works fine, but I get error from this below code with TusUploady,

Error:
422: Unprocessable Content:
File field is required

If ChunkedUploady works fine with the same configuration then why TusUploady isn't working?

    ```
    <TusUploady
        destination={{
            method: "POST",
            headers: {
                'Accept' : 'application/json',
            },
            url: "https://.../v1/assets"
        }}
        chunkSize={2142880}
        // params={{ file }} Possibly this is the solution(I am not sure though), but how can I get file?
    >
        <UploadButton >Upload File</UploadButton>
    </TusUploady>
    ```

from react-uploady.

yoavniran avatar yoavniran commented on June 12, 2024

TusUploady requires your server to implement the Tus protocol. Does your server support it?

from react-uploady.

yoavniran avatar yoavniran commented on June 12, 2024

moving to discussions

from react-uploady.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.