question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for stdin for 'az storage blob upload' command

See original GitHub issue

Is your feature request related to a problem? Please describe.

After running the following command:

$ echo foo bar buzz | az storage blob upload --container-name mycontainer -n test.txt -f /dev/stdin
{
  "etag": "\"0x8D...\"",
  "lastModified": "2022-01-13T21:50:19+00:00"
}

the blob content is empty.

Describe the solution you’d like

Correct content of the file should be uploaded.

Describe alternatives you’ve considered

Using a temporary file.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
WattsInABoxcommented, Oct 4, 2022

This feature technically uploads something but it doesn’t seem to be uploading my files correctly. Not sure if we should close this one and then open a new issue but when I do something to the effect of:

cat my-textfile.txt | xz | az storage blob upload -c my-channel --data @- --content-type application/x-xz

and then re-download the file, the file has:

7zXZִF!t/G]&J

For the first line and the xz program does not recognize the file. I have tried this with zst and other binary files and I can’t seem to get it to upload the file in the correct format. I suspect it has something to do with the handling of binary data since text files appear to work, but I have no way of confirming that.

What should I do?

1reaction
evelyn-yscommented, May 12, 2022

@chribsen If you use the command directly from main CLI, --length is not needed any more. The bug has been fixed in main CLI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

az storage blob | Microsoft Learn
Commands ; az storage blob delete; az storage blob delete-batch; az storage blob download ... Upload blobs or subdirectories to a storage blob...
Read more >
CLI Commands and Usage - blobxfer - Read the Docs
Remote Azure Storage reference using one of two methods: URL-based via --storage-url or the environment variable BLOBXFER_STORAGE_URL · Local path to upload ......
Read more >
GDAL Virtual File Systems (compressed, network hosted, etc…)
/vsiaz/ is a file system handler that allows on-the-fly random reading of (primarily non-public) files available in Microsoft Azure Blob containers, without ...
Read more >
Using the \copy command to import data to a table on a ...
To import the CSV data to the target RDS for PostgreSQL DB instance, first connect to the target DB instance using psql ....
Read more >
Auto-mounting encrypted drives with a remote key on Linux
#!/bin/sh set -e # Request the file from Azure Blob Storage using the URL ... $STORAGE_ACCOUNT_NAME # Upload the key az storage blob...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found