1

I have uploaded to google drive and dropbox(public folder) images that is not loading why is that when i access public url of google drive give as error saying (403. That’s an error.

Your client does not have permission to get URL /U7NFy4SAHqDw6I3-Yd11AG2fi5QaCiIsn62wqOJO0gPRO68G5yfGurFiVm75HezqRtmrwlE33lxRyTF6 from this server. (Client IP address: 103.21.166.13)

ACL Denied That’s all we know.)

This is my codeskulptor code.

import simplegui

message = "Welcome!"

# Handler for mouse click

image = simplegui.load_image('https://drive.google.com/file/d/0Bworipp9D5BbQ0t1aVE2NDlsaXc/edit?usp=sharing')
# Handler to draw on canvas
def draw(canvas):
    canvas.draw_image(image, (596, 25), (1192, 50), (100, 100), (128, 128))
    print image.get_width();
    print image.get_height();
# Create a frame and assign callbacks to event handlers
frame = simplegui.create_frame("Home", 300, 200)

frame.set_draw_handler(draw)

# Start the frame animation
frame.start()
user94559
  • 59,196
  • 6
  • 103
  • 103
  • When I try the URL in your code, I get a 302 response redirecting me to https://docs.google.com/file/d/0Bworipp9D5BbQ0t1aVE2NDlsaXc/edit?usp=sharing, which then downloads fine. (Of course, that's a web page, not an image, so it's not going to work in your code.) That's on the Google Drive side. What's the Dropbox URL you're trying to download? – user94559 Mar 04 '14 at 17:05

1 Answers1

2

Google Drive does not make direct links readily available to uploaded files.
This can be circumvented by changing the URL from:

https://drive.google.com/file/d/0Bworipp9D5BbQ0t1aVE2NDlsaXc/edit?usp=sharing

to:

https://docs.google.com/uc?export=download&id=0B8w52Vdma1fVMDhiZmlieEJxQ28


You can see that this is based on the general template of the following URL where you simply insert your file id from the original link:

https://docs.google.com/uc?export=download&id=

Source: Google forums.

Islay
  • 478
  • 4
  • 17