I am trying to upload PDF file but it is getting failed

{
“uri”: “https://api.aspose.cloud/v4.0/pdf/storage/file/Dummy_file.pdf?storageName=ExtractCommentUat1”,
“method”: “PUT”,
“headers”: {
“Authorization”: “sanitized”,
“Content-Type”: “application/octet-stream”
}
unable to upload pdf file to the storage getting 404 not found

@uattest1

It seems you are encountering a 404 error when trying to upload a PDF file to Aspose Cloud Storage. This error typically indicates that the specified resource could not be found. Here are a few steps you can take to troubleshoot and resolve this issue:

  1. Check the URL: Ensure that the URL you are using for the upload is correct. The format should be:

    https://api.aspose.cloud/v4.0/pdf/storage/file/{fileName}?storageName={storageName}
    

    Make sure that {fileName} and {storageName} are correctly specified.

  2. Verify Storage Name: Confirm that the storage name you are using (ExtractCommentUat1 in your case) is valid and exists in your Aspose Cloud account.

  3. Authorization Token: Ensure that your authorization token is valid and has not expired. You may need to regenerate it if it has expired.

  4. Content-Type Header: You are using application/octet-stream as the content type. This is generally acceptable for binary file uploads, but you might want to try using application/pdf specifically for PDF files.

  5. SDK Example: If you are using the SDK, you can refer to the following C# example for uploading a file:

    using (var file = System.IO.File.OpenRead("path/to/your/file.pdf"))
    {
        var response = api.UploadFile("file.pdf", file);
        Console.WriteLine(response);
    }
    

    This example demonstrates how to open a file and upload it using the SDK.

  6. Check API Documentation: For more detailed information on uploading files, you can refer to the official documentation on working with files and storage in Aspose PDF Cloud.

If you continue to experience issues after checking these points, please provide additional details about your request, and I will be happy to assist you further.

Sources:
[1]: Working with Files and Storage using Aspose.PDF Cloud