-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flysystem->delete($file) passes incorrect path #477
Comments
@digitalpho3nix I'm pretty sure this is misconfiguration. Could you share your config and some code to reproduce this? |
No worries! :) Filesystem.php
HttpController.php
Log.log
|
@digitalpho3nix You're using the full url to delete the asset, you should however only use the relative part (from the bucket, avatars/1.png). This causes the error. All the paths in Flysystem are relative to aid better portability. |
Well that works perfectly actually, thanks a bunch. I didn't see this tidbit of info in the docs or API initially, but now it seems quite obvious... :( Thanks for your time :) |
@frankdejonge maybe it should be stated more clearly in the documentation that path used with Flysystem should be always relative. Looks like it's a frequent issue :) |
@zaak good point 👍 |
@frankdejonge So if I want to move files between the different "disks", is there anyway to implement it ? |
@cjwotbot what you can do is use streams for this, the mount manager does this too, the code will be a copy of that actually. |
Hello! :)
I've come across an issue where the command delete() passes an incorrect parameter to assertPresent().
I'm using league/flysystem-aws-s3-v2 (1.0.1) with adapter aws/aws-sdk-php (2.8.2) and interacting with a standard Amazon S3 bucket, inside a Laravel 5.0.28 app.
I have an image URL which is being retrieved from a database (stored as VARCHAR) which is being retrieved (and stored) correctly. However, when the delete() command is used, one of the leading slashes is omitted...
eg. Image URL: https://s3-ap-southeast-2.amazonaws.com/anonbucket/avatars/1.png is being passed to assertPresent() as https:/s3-ap-southeast-2.amazonaws.com/anonbucket/avatars/1.png
One of the slashes after the https is gone! Logging in my code reveals the correct path is being passed to the delete() function, so something is going wrong in there somewhere....
Could you please advise on how to fix this?
Many thanks :)
The text was updated successfully, but these errors were encountered: