GithubHelp home page GithubHelp logo

Comments (9)

dbambulaks avatar dbambulaks commented on June 26, 2024 1

Nothing in try/catch :(

from restclient.

dbambulaks avatar dbambulaks commented on June 26, 2024 1

Ended up with this solution... :) And thanks for support!

        WWWForm form = new WWWForm();
        form.AddBinaryData("file", File.ReadAllBytes(filepath), name, mime);
        UnityWebRequest request = UnityWebRequest.Post(api + "/Documents/" + doc + "/file", form);
        yield return request.SendWebRequest();
        print("request completed with code: " + request.responseCode);
        if(request.isNetworkError) {
            print("Error: " + request.error);
        } else {
            print("Request Response: " + request.downloadHandler.text);
        }

from restclient.

jdnichollsc avatar jdnichollsc commented on June 26, 2024

Share logs please to see the error...

from restclient.

jdnichollsc avatar jdnichollsc commented on June 26, 2024

We're using this solution http://answers.unity.com/answers/1436091/view.html
Let me know if you have a better solution for that issue of Unity

from restclient.

dbambulaks avatar dbambulaks commented on June 26, 2024
UnityEngine.Debug:Log(Object)
<>c:<TestUpload>b__12_1(Exception) (at Assets/Inextia/Scripts/Inextia.cs:161)
RSG.<>c__DisplayClass44_0:<Catch>b__1(Exception)
RSG.Promise:InvokeRejectHandler(Action`1, IRejectable, Exception)
RSG.<>c__DisplayClass34_0:<InvokeRejectHandlers>b__0(RejectHandler)
RSG.Promises.EnumerableExt:Each(IEnumerable`1, Action`1)
RSG.Promise:InvokeRejectHandlers(Exception)
RSG.Promise:Reject(Exception)
RSG.<>c__DisplayClass44_0:<Then>b__1(Exception)
RSG.Promise`1:InvokeHandler(Action`1, IRejectable, Exception)
RSG.<>c__DisplayClass24_0:<InvokeRejectHandlers>b__0(RejectHandler)
RSG.Promises.EnumerableExt:Each(IEnumerable`1, Action`1)
RSG.Promise`1:InvokeRejectHandlers(Exception)
RSG.Promise`1:Reject(Exception)
Proyecto26.RestClient:Promisify(Promise`1, RequestException, ResponseHelper)
Proyecto26.<CreateRequestAndRetry>d__0:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

from restclient.

jdnichollsc avatar jdnichollsc commented on June 26, 2024

Unity is so descriptive... Honestly, I have no idea. Can you try with the source code of the plugin and debug your code please?
Let me know, thanks in advance!

from restclient.

dbambulaks avatar dbambulaks commented on June 26, 2024

Maybe you can provide your example from forum? Can't make it work either with WWWForm() or boundary...

from restclient.

jdnichollsc avatar jdnichollsc commented on June 26, 2024

Reviewing your logs, it looks like an unhandled exception, can you see other error using try/catch?

from restclient.

jdnichollsc avatar jdnichollsc commented on June 26, 2024

Ok, the new FormData property was included in the new version 2.5.0, check the README of the project.
Thanks for report this issue!

from restclient.

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.