I'm trying to download images to local files using apps script on the server side and javascript on the client side. Is that what you're doing? If so, I'd like to see the working code on both sides of the connection, as I'm having a terrible time trying to get any of my ideas working and I don't know the context of the above code.