Skip to content
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

example collage not working for me. #31

Closed
johncarlson21 opened this issue Nov 15, 2017 · 5 comments
Closed

example collage not working for me. #31

johncarlson21 opened this issue Nov 15, 2017 · 5 comments

Comments

@johncarlson21
Copy link

I'm trying to use the example collage, but it just isn't working. I'm getting an error, I'm guessing on the sources.

this is my code: https://pastebin.com/WdfwSmY8

I'm using some local files on my server, which are the last 2 source images.

the error I'm getting is:

[15-Nov-2017 17:24:33 UTC] PHP Fatal error: Uncaught Filestack\FilestackException: [400]: conv20 provider error: Error fetching file: 401 (idx 0)
thrown in /home/stagmm/public_html/tools/filestack/filestack/mixins/CommonMixin.php on line 314

@hueyl77
Copy link
Contributor

hueyl77 commented Nov 16, 2017

hi @johncarlson21

A 401 errors means there is an authorization error. Looks like your sources http://staging2.magicmurals.com/tools/filestack/tests/testfiles/Ultimo_TopNav041816.jpg and

http://staging2.magicmurals.com/tools/filestack/tests/testfiles/Ultimo_ColorScheme-041816L.jpg

requires an auth username and password.

In order to use collage your sources have to be accessible by the code.

@johncarlson21
Copy link
Author

Yeah.. I first had the auth turned on, but then I disabled it and it wouldn't work.
I'm going to give it a shot on another server and see how it goes.
Thanks.

@hueyl77
Copy link
Contributor

hueyl77 commented Nov 16, 2017

Sure, please let us know how it goes.

p.s. Also make sure the destination folder exists and your code has permission to write to it. The created collage file will be downloaded to that destination when you make this call:

$collage_filelink = $client->collage($sources, 800, 600);

$destination = __DIR__ . '/tests/testfiles/collage-test.png';
$result = $collage_filelink->download($destination);

If you don't want it downloaded, you should be able to just grab the URL of the file generated on the Filestack server by calling the url() function on the result Filelink object.

$collage_filelink = $client->collage($sources, 800, 600);
$new_collage_image_url = $collage_filelink->url();

@johncarlson21
Copy link
Author

johncarlson21 commented Nov 16, 2017 via email

@hueyl77
Copy link
Contributor

hueyl77 commented Nov 20, 2017

👍

Thanks for the updates. Feel free to hit me up with questions at anytime if you run into any other issues. Cheers :)

@hueyl77 hueyl77 closed this as completed Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants