new feature: Generate permanent URL for public read
- Dominant language
- Rust
- Stars
- 5.4k
- Forks
- 825
- Avg merge
- 1d 14m
- Merged PRs (30d)
- 127
Description
### Feature Description
Create a function for `Operator` (somewhat similar to `presign_read`) which generates a permanent publicly accessible URL to the resource. For example, I'm using Google Cloud Storage emulator and I have configured `Gcs` service like this:
```
Gcs::default()
.bucket("test")
.root("/")
.disable_vm_metadata()
.allow_anonymous()
.endpoint("http://127.0.0.1:9199")
.disable_config_load();
```
Now let's say I want to access a file "myfile.txt". I would like to generate a direct public access URL that looks like this:
`http://localhost:9199/v0/b/test/o/myfile.txt?alt=media`
### Problem and Solution
Many object storage services such as Google Cloud Storage and S3 allow public read access to files. `Operator` nicely abstracts all these services, but since it doesn't have the ability to generate permanent and publicly accessible links, I loose this abstraction.
### Additional Context
As an alternative, I tried to use `.info()` to find the necessary information to generate the url. However, neither `Operator` nor `OperatorInfo` expose `endpoint`, which further complicates workarounds.
### Are you willing to contribute to the development of this feature?
- [ ] Yes, I am willing to contribute to the development of this feature.
Contributor guide
Research direction
Start with the Operator presign_read entry point and inspect the related OperatorInfo metadata, including the missing endpoint information. Compare the requested GCS URL with the behavior needed across the object storage services abstracted by Operator; done means a documented, permanent public-read URL API works consistently without requiring callers to reconstruct service URLs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, rust
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100