storage icon indicating copy to clipboard operation
storage copied to clipboard

Downloads blocked based on user agent?

Open digitaljohn opened this issue 1 year ago • 3 comments

When I attempt to download an item from blob storage from a python script (urllib.request.urlretrieve(input_value, filename)) it fails with a 403. I can confirm it is fully public, e.g.

https://zggi1etfjuuy7hkt.public.blob.vercel-storage.com/42c8127f-82c0-4dee-a15f-d8d01cccf9bd-GIlpRfWn4ihUwaX87s5ETI1C0vLzOE.jpg

Is this intended behaviour? Is there a workaround?

digitaljohn avatar Feb 12 '24 16:02 digitaljohn

@digitaljohn Thank you, we had different reports of this. It's probably a firewall blocking your (legit) python request. Could you send the request and response headers along with the body you're receiving for this request? Thank!

vvo avatar Feb 13 '24 10:02 vvo

@vvo I do not have access to the execution environment but im using a replicate.com 'cog':

https://github.com/fofr/cog-comfyui

You can see and reattempt to run here using this failed job: https://replicate.com/p/zvb42b3bgtmgfqpbnesgeezyjq

digitaljohn avatar Feb 13 '24 20:02 digitaljohn

@vvo here is the specific line also for reference:

https://github.com/fofr/cog-comfyui/blob/main/helpers%2Fcomfyui.py#L117

digitaljohn avatar Feb 13 '24 21:02 digitaljohn