Forum Discussion

preetiverma1's avatar
preetiverma1
Qrew Member
5 years ago

read word document inside the QB

Hi All,

i am trying to read the word  document  inside the quickbase but i am getting issue.

what i am trying to do.

1.   get the ticket from the API_Authenticate 
2. pass the ticket in to Do_query API to get the document URL where  attached my word document.  
3. but i m trying to read it it giving me all sign in page HTML and CSS.

I am able to read the word document from my local but unable to read it  from Quickbase.


Thanks

------------------------------
preeti verma
------------------------------
  • AustinK's avatar
    AustinK
    Qrew Commander
    What is the ultimate goal here? You want to load the word document in your web browser and view it like that? 

    When using the requests module it will send you back the raw HTML like you are seeing. You are running it in something like Google Collab? You are running a DoQuery and then seeing the results of that printed out. If you do the same DoQuery via a URL manually you would see the same thing in your browser. That is a success message telling you that everything worked. However it is not doing what you expect it to.

    If you want to load a file you need to figure out the link first and then do the same GET request but for the exact file you want and that should return the raw file to you, so all the text.
    • preetiverma1's avatar
      preetiverma1
      Qrew Member
      My goal here  is to get the track changes record ( means to get the new inserted text and deleted text  from the word document) . i am able to capture the changes when i get the document from the local but when i read the document using python from QB then its returning the raw HTML.



      i am able to get the record data with the document URL.
      when i read the document using below code its giving me raw HTML.

      wordfile=urlopen("document URL ").read()

      Thanks


      ------------------------------
      preeti verma
      ------------------------------
      • AustinK's avatar
        AustinK
        Qrew Commander
        I will try and look into this more tomorrow. I was getting similar results as you when testing against my own docx file hosted in Quick Base. Seeing the HTML and honestly it feels like it is not authenticated properly. It should be possible to visit the URL and get the file back in some form. I know docx can be annoying to deal with though.