9 comments

  • 0
    Avatar
    ^UD\_$

    Hi Sabin,

    You could try the GetFailureReason() function, to get more insight about the failure reason

  • 0
    Avatar
    Sabin Maharjan

    GetFailureReason() gives empty result

  • 0
    Avatar
    ^UD\_$

    Try to print responseCode right after

    responseCode = xfr.PostFromFile(filePath)

    You may have to convert from Integer to string...

     

    You can run the PostFromFile() directly in the debugger, and get a better sense of possible latency, timeouts, etc...

     

    Also, for real life applications the Async function may be more suitable.

    AsyncPostFromFile(filename As String) As Boolean
    Uses the HTTP POST method to post the contents of the specified file to the current URL. Events of the type roUrlEvent will be sent to the message port associated with the object A False return indicates that the request could not be issued and no events will be delivered.

     

     

  • 0
    Avatar
    Sabin Maharjan

    I get the following response as expected. My REST endpoint isn't seeing any files coming in the body.

    @snapshotUploaderPlugin Response Code: 400
    The requested URL returned error: 400 Bad Request

  • 0
    Avatar
    ^UD\_$

    Using the same method, can you upload with a tool such as CocoaRestClient or equivalent?

    Does your REST API require authentication?

  • 0
    Avatar
    Sabin Maharjan

    Yes, I can use POSTMAN to upload the file. There is no authentication. The Status Code is 400 Bad Request.

     I did a trace log on my back end REST API and the file count is 0 

  • 0
    Avatar
    Sabin Maharjan

    I finally fixed this issue.

    It turned out Brightsign (AsyncPostFromFile()) sends the file as binary even though I set Content-Type="multipart/form-data". So, I had to change my backend REST API (.NET WEB API) to read content as binary instead of looking for multipart/form-data

    Thanks for all the help guys. 

  • 0
    Avatar
    Isai Lopez

    hi sabin, I want send to server the screen shot, I need create a PHP in the server and use your plugin?? thanks 

  • 0
    Avatar
    Sarin sukumar A

    I am not able to figure out how to upload the plugin to a brightsign player. so that the snapshots can be uploaded to a rest api while presentations are being played. Can anyone help ?

Please sign in to leave a comment.