OCI Object Storage: Handling 'Not Found' scenarios When Accessing Files with Pre-signed URLs
I'm trying to debug I'm trying to configure I'm working on a project and hit a roadblock... Quick question that's been bugging me - Hey everyone, I'm running into an issue that's driving me crazy..... I've been struggling with this for a few days now and could really use some help... I'm working with an scenario when trying to access files stored in OCI Object Storage using pre-signed URLs. I have configured the storage bucket correctly and generated the URLs using the SDK, but when I try to access them, I receive a '404 Not Found' behavior. Here's the code snippet I'm using to generate the pre-signed URL: ```python import oci config = oci.config.from_file() bucket_name = 'my-bucket' object_name = 'my-file.txt' namespace = 'my_namespace' client = oci.object_storage.ObjectStorageClient(config) pre_signed_url = client.generate_presigned_url( 'GET', namespace_name=namespace, bucket_name=bucket_name, object_name=object_name, expiration_seconds=3600 ) print(pre_signed_url) ``` I've verified that the bucket and object names are correct, and that the object exists in the specified bucket. However, when I access the printed URL in the browser, I get '404 Not Found'. I've checked the permissions and the pre-signed URL is being generated without errors. Additionally, I noticed that the object is in a different compartment than the one I'm currently authenticated with, but I'm not sure if that would affect the ability to generate the pre-signed URL or access it. Any insights on what might be going wrong here? Is there something specific I might be missing in my configuration or permissions? I'm working on a CLI tool that needs to handle this. This is happening in both development and production on Debian. Is there a better approach? Thanks, I really appreciate it! For context: I'm using Python on Debian. Has anyone dealt with something similar? What am I doing wrong? The stack includes Python and several other technologies. Is there a better approach?