Git Product home page Git Product logo

filestack / filestack-php Goto Github PK

View Code? Open in Web Editor NEW
55.0 55.0 28.0 26.89 MB

Official PHP SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.

Home Page: https://www.filestack.com

License: Apache License 2.0

PHP 100.00%
documentation filestack php sdk transforming-files upload-file upload-images

filestack-php's People

Contributors

akalongman avatar anaxamaxan avatar hueyl77 avatar kyuss avatar selfsimilar avatar weotch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filestack-php's Issues

bad request on executing the download

{
try{
$products = new UploadModel();
$data = $products->find($id);
$decode_data = json_decode($data->json);
$client = new FilestackClient($decode_data->cilent);

    $destination = 'uploads/'.$data->pdf;
    $result =  $client->download($decode_data->filelink->handle,$destination);
}
catch (FilstackException $e){
    echo $e->getMessage();
    echo $e->getCode();
}   
}

Unable to upload from URL

I don't know if this package has the functionality but, i'm trying to upload an audio file using an absolute path to the file on the internet but it keeps saying that file is not found

$filestack = new FilestackClient(config('services.filestack.key'));
$response = $filestack->upload('https://www.soundhelix.com/examples/mp3/SoundHelix-Song-9.mp3', [
    'filename' => $lesson->name
 ]);

Here is the error message
file_not_found_exception

Please how can this be fixed

Filestackclient upload - option 'path' does not set the s3 directory correctly

Hi,

In the upload function (FilestackClient->upload($filepath, $options )) we can pass option array as the second parameter with many options. As I understand 'path' is one of the available options according to docs which set the path inside the s3 bucket.

Issue :
But no matter what you set with the option['path'] the uploads always end up in the root of the s3 bucket.

"version": "1.1.12"

Uploading Fails using filestack-php

Installed with Composer

Using the following code, results in:
Errored uploading to s3503



require("../../../vendor/autoload.php");
use Filestack\FilestackClient;
use Filestack\Filelink;
use Filestack\FilestackException;

$filepath="../../../Docs/12.spring.clinic.assignments.xlsx";
$client = new FilestackClient('************');
try {
    $filelink = $client->upload($filepath);
    var_dump($filelink);
} catch (FilestackException $e) {
    echo $e->getMessage();
    echo $e->getCode();
}

How to OCR an image

I've done searching the code, by no clue on how to do a OCR on an image.
Any help?

disable guzzlehttp ssl check

hi

i need to crontab a local batch upload .
i get "Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate"

because of guzzle ssl "verify"=true

$client = new FilestackClient('mykey");
$client .... How-to-force-no-ssl-check ? (verify = false)

any idea ?

Is this project still maintained?

There have been some updates in the dependencies used by this project, but for some years no new release to support them.

Could you please provide some information about the stand of the project?

Thanks in advance.

Work directly with the filestack url

Hi
In you example you initilize the Filelink instance with the handle of a file.
Is there any way to initilize the Filelink or Fileclient with the full filestack url ex https://cdn.filestackcontent.com/aUjxxxxxxxxxxvU ? Since your cdn could change at any time, it is a bit tricky to extract the handle here
Thank you
Cordially

Filelink convertFile with option docinfo not working

Trying to get the numpages of a pdf file by using the following is not working.

$filelink->convertFile('jpg', ['docinfo' => TRUE]);

The response from this call returns this:

array:2 [
  "dimensions" => array:2 [
    "height" => 792
    "width" => 612
  ]
  "numpages" => 2
]

Since the response to these transform calls is handled in CommonMixin::handleResponseCreateFilelink

It tries to run the code and fails on this line $url = $json_response['url']; Since the response doesn't have a url property.

It doesn't seem that there is any code handling this kind of requests even when in the docs it mentions this option docinfo is available through this convertFile function.

Expected Result: It should handle the response and expose the result either as a property in FileLink or in a new class.

Edit: typos

[Feature Request] Workflows missing from metadata

Hello,

it seems we cant retrieve workflows from metadata.

i can see the workflows in the network tab when uploading,

i have a table in the database which record payload of webhooks from filestack, so i can retrieve the jobs like that,
but it would be cleaner to just retrieve from the metadata.

thanks

Custom CNAME Support Missing

the JavaScript API client has custom CNAME support, though it looks like none of the other API clients include support.

Is this feature specifically omitted, or just not implemented yet? It seems like it would be relatively straightforward to implement.

$filelink->download($path) fails with HTTP 400 Bad Request

I'm trying to download an image via Filelink, but it is failing with HTTP 400 Bad Request.

Simple repro:

use Filestack\Filelink;

$handle = 'XpfswLCnSx2igH7tJFbQ';
$apiKey = '...';
$filelink = new Filelink($handle, $apiKey);
$filelink->download('out.jpg');

Result:

Filestack\FilestackException with message 'Bad Request
'

The generated URL for this request is https://cdn.filestackcontent.com/XpfswLCnSx2igH7tJFbQ&dl=true, and you'll notice that visiting the link directly also results in HTTP 400.

The issue lies with the malformed URL query string &dl=true which gets added in CommonMixin::sendDownload. It should either be removed entirely or, in this case, it should be ?dl=true.

In case it matters, the Filestack Ruby library does not append &dl=true in its FilestackCommon#send_download method.

I'm happy to send a pull request to remove the query string if needed.

Improve return type-hints

Currently, the library uses type-hints that not exist.

For example, FilestackClient has a convertFile method that has a return type-hint of Filestack/Filelink while the correct one is \Filestack\Filelink.

This improvement will allow us to use the type-hint properly into php7+ projects.

example collage not working for me.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.