-
Notifications
You must be signed in to change notification settings - Fork 200
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
Problem with creating a signature #41
Comments
Same here. Maybe someone can make a good example? Will be usable for everyone, looks like from the docs it's a create feature. |
@keithslater Hmm, I'll have to take a closer look at this to understand what's going wrong. Are you able to provide me example URLs that you're working with? |
Sure, I'm doing something like this - http://www.domain.com/image.php?image=company_logos/original/1.png&w=250&h=100 Then when I call it, I'm doing this -
Path would be - company_logos/original/1.png |
Okay, so I think i see what's going wrong here. Glide is designed for URLs that work like this:
And then you would create a route within your app to accept those image requests, something like this: get('/img/{path}', function ($path) {
$glide->outputImage($path, $_GET);
}); The reason that URL isn't working for you is because To make a path like Having said that, it would probably be helpful to offer something like this as well with Glide, instead of having to use the HttpFoundation request object for HTTP signatures: SignatureFactory::create('key')->validateRequest($path, $_GET); I'll add that to my to-do list. |
As promised: 615861a I'll get this tagged as soon as possible. |
promising! can you please update docs also with a good example to use this signature-feature? |
Awesome, thanks. |
I just started using Glide and I am attempting to set up signatures for the images. I believe I'm about 99% there but I'm having a problem with it.
I am doing this -
When doing this, the result of $parts['path'] inside the getUrl method is /image.php.
However when doing this -
The output of $request->getPathInfo() in validateRequest() method is just a /.
Because of this, the signatures don't match. Any idea how I can fix this?
The text was updated successfully, but these errors were encountered: