Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6320855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:02:55+00:00 2026-05-24T16:02:55+00:00

Hi I am trying to write a chrome extension which needs to read in

  • 0

Hi I am trying to write a chrome extension which needs to read in an email attachment (plain txt). I feel this should be possible as gmail gives you a download link, however it is not a direct link does this make it impossible?

I have the following code to read a remote file which works just not for gmail:

<script>
var txtFile = new XMLHttpRequest();
txtFile.open("GET", "http://remote.com/remote_file", true);
txtFile.onreadystatechange = function() {
  if (txtFile.readyState === 4) {  // Makes sure the document is ready to parse.
    if (txtFile.status === 200) {  // Makes sure it's found the file.

        allText = txtFile.responseText; 
        lines = txtFile.responseText.split("\n"); // Will separate each line into an array
        alert(allText)
    }
}
}
txtFile.send(null);
</script>

Does anybody know how I can read a gmail attachment like this?
thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:02:56+00:00Added an answer on May 24, 2026 at 4:02 pm

    Gmail has a link to original email source (“Show Original” from the menu). Not sure if it is possible to read it programmatically, but if it is, I would try to parse original message source instead and get attachments from there (they are base64 encoded I beleive).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to figure out how to write a simple Chrome extension which allows
I'm trying to write a chrome extension that needs to keep a state of
I'm trying to write a Google chrome extension so that I can highlight text
I'm trying to write a Chrome extension that takes a URL and shows all
I am trying to write an extension to google chrome and I want to
I'm trying to write a Google Chrome extension to put autocomplete in certain fields
I'm actually trying to write a Google Chrome extension (with little-to-no experience). What I'm
I'm trying to write a Chrome extension that as a part of what it's
I'm currently trying to write an extension which alters the CSS of the Document
I'm trying to write a Chrome Extension that just adds a CSS file to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.