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 8738235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:41:40+00:00 2026-06-13T10:41:40+00:00

I have an image encoded as base64 blob that I can serve up successfully

  • 0

I have an image encoded as base64 blob that I can serve up successfully from Google Apps Script – as per this jsfiddle

I’m trying to now save this as an image on Google Drive using Google apps script. Although I can write the file, and when I download it access it, it is indeed an image, the google docs viewer cannot preview it. Here’s the code to save it – which works, and correctly reports the content type as image/png.

 function writeToDrive() {
      var blobOb = blobObGet("googleLogoBlob");
      if (!blobOb.error) {
          var imgBlob = Utilities.newBlob(Utilities.base64Decode(blobOb.blob),"image/png",blobOb.name + ".png" );
          Logger.log (imgBlob.getContentType());
          var file = DocsList.createFile(imgBlob);
      }
    }

How do I access the file metadata from google apps script so as to set the correct mime/type for the the google docs viewer ?

  • 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-06-13T10:41:41+00:00Added an answer on June 13, 2026 at 10:41 am

    I’m afraid this is probably related to this issue with jpegs…
    The issue has been posted on april 2012 but it’s not fixed yet.

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

Sidebar

Related Questions

I have to upload a base64 encoded image that i am receiving from android
I have image map that can I move, but this map will be so
I have a function which retrieves a base64 encoded image from a controller and
I have an image thumbnail, encoded as base64, that I want to use as
I have a string of of base64-encoded PNG image that is suitable to use
I have an image that is Base64 encoded. What is the best way to
Possible Duplicate: base64 encoded images in email signatures I have a image stored in
I have an app which requires downloading image asynchronously in base64 encoded string(server is
I have an application, currently written in C#, which can take a Base64-encoded string
I've been trying to Base64 encode image data from the user (in this case

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.