문제

I have successfully setup the oauth authentication to access my dropbox using sharpbox. Sharpbox is an open source "front end" that handles the nuts and bolts of the process. Using it i can return file info in a particular folder in my account.

I bind the filename and a generated URI to a gridview in a VS 2010 web app. I have a hyperlink with the text set to name and the DataNavigateUrlFields to the unique URL. It works great IF there is no "+" character in the oauth_signature part of the url string. If the plus is there, it returns "{"error": "Invalid signature. Expected signature base string:"

Thanks for your consideration.


Thank you for your help, here is my code

Public Sub MakeURL()
    dbOpen()
    Dim myfolder As ICloudDirectoryEntry = dropBoxStorage.GetFolder("/DIR/SUBDIR/")
    Filename = Filename & "_POID_" & poid & ".pdf"
    pdfurl = dropBoxStorage.GetFileSystemObjectUrl(Filename, myfolder).ToString
    dbClose()
    pdfurl = pdfurl.Replace("+", "%2B")
    Response.Redirect(pdfurl)
     End Sub
도움이 되었습니까?

해결책

OAuth 1 Signature uses Percent Encoding (See RFC 5849). The specification clearly states that a space should not be encoded to a +, instead it should be encoded with %20. Replace your + with %20.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top