How to fix "We couldn't upload your data RestError: Failed to send request to..."

Lorentz Yeung 20 Reputation points
2024-10-02T07:25:13.3466667+00:00

Hi guys,
I am trying to upload my own data in Chat, it's just a small txt file, and 42 bytes in size. However I am thrown this error:
"We couldn't upload your data ``RestError: Failed to send request to https://myblob.blob.core.windows.net/fileupload-abcdefg?sv=2015-04-05&ss=bf&srt=sco&sp=lrw&se=2024-10-02T08%3A13%3A09.7860000Z&spr=https&sig=oPtoDtOsrXd1vQyLaxIuC2qbEoGZ00TXb1YEghDjxxx%3D&restype=container&_=1727853190xxx"

The message seems indicating a failure to send the request.

I have checked my Shared Access Signature (SAS) settings and it seems mostly correct. Here are summary:

  1. Allowed Permissions:
    • I have selected the necessary permissions: Read, Write, Delete, List, Add, Create, and Update.
  2. Allowed Services:
    • I have enabled access for Blob, File, Queue, and Table services.
  3. Allowed Resource Types:
    • I selected all.
  4. SAS Token Validity:
    • My SAS token is valid from 02/10/2024 to 04/10/2024
  5. Allowed IP Addresses:
    • I have no specified IP address restrictions.
  6. Allowed Protocols:
    • I selected HTTPS only.

Would anyone please help to solve this issue?

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,940 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,291 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Nehruji R 8,151 Reputation points Microsoft Vendor
    2024-10-03T08:02:48.5166667+00:00

    Hello Lorentz Yeung,

    Greetings! Welcome to Microsoft Q&A Platform.

    If you were able to upload files to your Azure Blob Storage before, but now you are facing issues, there might be several reasons for this behavior. Here are some common troubleshooting steps you can take to diagnose and resolve the issue:

    1. Check Azure Storage Account Configuration: Ensure that your Azure Blob Storage account is properly configured and accessible. Double-check the account name, account key, or connection string you are using in your application to access the storage account.
    2. Check CORS Configuration: If you are uploading files from the client-side, ensure that Cross-Origin Resource Sharing (CORS) is configured correctly on your Blob Storage account. CORS rules might have changed, causing issues with your application's ability to upload files. Review and update CORS settings as needed.
    3. Test with Different Blob Storage Account: Create a new Blob Storage account (if possible) and try uploading a file to it using same method. This can help identify whether the issue is specific to the storage account or if it's related to your application's code or configuration. Recreate another storage with the region closest to your old storage, enable CORS for all methods and generate new SAS URL.
    4. Review Changes: If the issue persists, review any recent changes you made to your code related to file uploads. Compare it with a previous version that was working correctly to identify any potential issues or regressions.
    5. Check for Network or Firewall Issues: Ensure that there are no network or firewall issues that might be preventing your application from accessing the Blob Storage account.
    6. Update SDK or Libraries: If you are using any Azure SDK or third-party libraries to interact with Azure Blob Storage, make sure you are using the latest versions. Older versions might have compatibility issues.

    refer - https://learn.microsoft.com/en-us/troubleshoot/azure/azure-storage/blobs/connectivity/invalid-blob-or-block-content-or-invalid-block-list for more troubleshooting steps.

    Please let us know if you have any further queries. I’m happy to assist you further.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.