Azure / Azure/azure-storage-python
The sasToken in copy_source_url is needed when specify requires_sync=True in copy_blob method.
- Lenguaje dominante
- Python
- Estrellas
- 343
- Forks
- 243
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I used the copy_blob method to copy blobs **in the same storage account**, and both of the **containers are private**.
If I did not specify the sasToken in the copy_source_url, then an error occured, like below:
**HTTP status code=404. ErrorCode: CannotVerifyCopySource. The specified resource does not exist.**
The completed code is as below:
```
from azure.storage.blob import BlockBlobService
accountName="xxx"
accountKey="xxx"
blobs = BlockBlobService(account_name=accountName,account_key=accountKey)
#copy_source_url
copySource="https://xxxx.blob.core.windows.net/f22/gen2.JPG"
blobs.copy_blob("dest_container","dest_blob_name",copySource,requires_sync=True)
```
Some other observations:
1. if the source container is public, it works without specify sasToen
2. if the source container is private, but remove the requires_sync=True, it can work well.
Could you please let me know if it's by design or it's a bug? I cannot find any docs about it.
Guía de contribución
Línea de trabajo
Empieza reproduciendo la llamada reportada a copy_blob con contenedores privados, copy_source_url sin un token SAS y requires_sync=True. Compárala con un origen público y con requires_sync omitido; el trabajo estará terminado cuando se determine si el 404 es un comportamiento esperado o un error, y se documente o corrija ese comportamiento.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- azure, python
- Área
- cloud
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 38/100