Git Product home page Git Product logo

client-php's People

Contributors

btimby avatar freak3dot avatar jnemery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

client-php's Issues

File Download Php SDK Issue

Hello ,

I are integrating smart files for a web application where we intend to use smart-files as storing space for all user related content.

Using php sdk I am creating directories and then uploading files to smart-files. But download functionality is not working properly.

Our scenario is users will be able to download their files. Authentication control is managed in on our side and after local authentication logic I require an api call to smart file to initiate the download.

Currently API method in the sdk is just getting the file content in a string. I need help in following :

  1. How to get download file api response in json/xml format so that I can easily manage file headers.
  2. How to initiate direct download rather then getting a string output.

I am using following code as explained in sdk

client = new Service_SmartFile_BasicClient(API_KEY, API_PWD);

$client->api_base_url= 'https://yoursite.smartfile.com/api/2';
$response = $client->doRequest('/path/data/test.txt', 'get');

echo $response;

And getting this response

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 11 Aug 2015 15:38:37 GMT
Content-Type: text/plain
Content-Length: 1009
Last-Modified: Thu, 06 Aug 2015 13:46:06 GMT
Connection: close
Expires: 0
Cache-Control: no-store, no-cache, must-revalidate
Set-Cookie: csrftoken=cTRv5VMmuuM6qEwDyY0OAcMwAzzg5YMx; expires=Tue, 09-Aug-2016 15:38:37 GMT; Max-Age=31449600; Path=/
Set-Cookie: sessionid=41701cc812da4710ff73642b077aa326; expires=Tue, 11-Aug-2015 15:58:36 GMT; Max-Age=1199; Path=/
Accept-Ranges: bytes

XlGteyRxHzpDCCfHXwy3Lz2CuJHkaNUytSKRZUbxjPFRQPTtw9U50BQhvPzXv0ECjeqDRU8TEk6ulEfcOZftRbIEbNcjkS2qCjL7
mHsZCiXtoGMQuaTyiRRnCu71IFjJp844oPi9VbE9DirC6SCS1qK7XqW1ONHRbRPmFcu6iG6XWycwQpza87ngPXSlK5g8RLE6lhQv
PTyGzCbUvvwzN1LvKCBA2aWJFUP2MyOSITlODeNyHUo29yLX0Lei73VJGJQ5OloH5xaaQr7GkfV8Nk3iEqCP79cqkZg84FeLbmvV
lOJwjXKW2nolIuZo2roSfZKgzB2ONUezWxzVxPwfPo6IS4EaVLNJp1BSCBjpSjzsE4bl5mu3CkZW7954wDPeo3cwXn21vQlp9XbT
LGblLl8ARrck33sy2GZv7L2sW9ezYJUYGDsRUNmL9vWylJ7qmiv930foanADvkpMn4ByKGCZh9340uPLqAJ5ZekksHjcxCGjVrZO
5aN0s96q8TpWUaNJB8EDj50qU62xtxHn4vLbY0R63b6UDDKjm1pYznrSr6VQVHw9D5DSq5ICowvSlCHK6ZWUUo9Q7SLGV2exkQbi
a8DLofr2Rlac4qwKqBtvCkcw511LeMNngL46tDwHseKvQG3EyNBLQDD1rmiHkSj5kplO5SxumXS1Qap2f543YrMv9UBMRfm0Yr8F
H7oZGz0PTsDemetyD1IxxgTgfjURhAmiaV9AsVZV8OLcm2fukW4Xc10ASBYHvv6JkZom1sAU9XCR7fYT4Hu2CSqbzwI3eH2bFXIz
C2rNjZUgeqNqtUhQIvbpVqztAHT4zHE49h63pCKjfl0yJwq0XXcJaZSbNkiixBIesOu1yEbEtn1YemODyfKe5SFfWrKHIoHUrckr
jM8HNiyb9TBqP64fluzA0L0WOQlNNGci0qx6Uj3vsoX949ysR77Dc4Dv3b0XSwAWt6JiCkl4034qq7PXLmo4puGSAkXFG

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.