utopia-php / storage

Lite & fast micro PHP storage library that is **easy to use**.
https://appwrite.io
MIT License
28 stars 62 forks source link

optionally can define endpoint URL #103

Closed schneidermr closed 8 months ago

schneidermr commented 10 months ago

With my changes, the S3 module will be able to support other storage with S3 compatible API's

Fixes: https://github.com/utopia-php/storage/issues/28

schneidermr commented 10 months ago

I'll check and fix that linter error, but the unit test error looks a bit strange to me. It seems like it's failing to another adapter

schneidermr commented 10 months ago

@stnguyen90 Please confirm my suspicions, but as I see these lint problems are not related to my changes

stnguyen90 commented 10 months ago

unit test error looks a bit strange to me. It seems like it's failing to another adapter

Yes, you can ignore that failing unit test

these lint problems are not related to my changes

The lint problems might be related as it mentions the S3.php file and you modified that file. You can easily fix the lint problems by running the formatter (composer format).

stnguyen90 commented 10 months ago

@schneidermr, were you able to test this adapter with a couple of different providers to make sure it works? Can you provide some screenshots of successful tests?

schneidermr commented 10 months ago

@schneidermr, were you able to test this adapter with a couple of different providers to make sure it works? Can you provide some screenshots of successful tests?

I've to find some free providers for the test because I'm using GCP, but until that here is the demo with Cloudflare R2.

https://github.com/utopia-php/storage/assets/6516698/2a85229d-cc10-4fa0-8d9e-99c7fd46f25c

eldadfux commented 9 months ago

PR looks good, but we need tests to pass before we can merge.

schneidermr commented 8 months ago

PR looks good, but we need tests to pass before we can merge.

The authorization header is malformed; a non-empty Access Key (AKID) must be provided in the credential. https://github.com/utopia-php/storage/blob/5af2bd060e8f3280c6b31f597848b615981519f2/tests/Storage/Device/LocalTest.php#L258

@eldadfux it seems the problem is not in the code.

pietrodicaprio commented 8 months ago

Checking the latest open PRs: it looks like they are all failing the unit tests due to the empty variable.

Are the secrets properly set in the repo and readable by the Action executed on a PR from a non-member? The latest passing is #105 but the committer is a Contributor.

The secrets are not readable from actions run on pull_request. It's required to set pull_request_target as trigger. Here an example of a repo I own: https://github.com/Vanilla-OS/ABRoot/blob/main/.github/workflows/go-pr.yml#L4C23-L4C23

GitHub doc reference: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflows-in-forked-repositories and https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target

pietrodicaprio commented 8 months ago

Nice workaround @lohanidamodar , I hope you don't plan to do this for every PR 😆