vercel / storage

Vercel Postgres, KV, Blob, and Edge Config
https://vercel.com/storage
Apache License 2.0
479 stars 52 forks source link

Downloads blocked based on user agent? #596

Open digitaljohn opened 4 months ago

digitaljohn commented 4 months ago

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?

vvo commented 4 months ago

@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!

digitaljohn commented 4 months ago

@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 commented 4 months ago

@vvo here is the specific line also for reference:

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