smartfile / client-php Goto Github PK
View Code? Open in Web Editor NEWSmartFile API Client (PHP).
Home Page: http://app.smartfile.com/api/
License: MIT License
SmartFile API Client (PHP).
Home Page: http://app.smartfile.com/api/
License: MIT License
In the _request method, only do json__decode for 'application/json' content-type.
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 :
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
Please add composer support
A developer had an issue with responses not returning anything. This appears to be an issue where the line that populates the response object has been commented out.
https://github.com/smartfile/client-php/blob/master/Services/SmartFile/Client.php#L222
The following should not be necessary:
All of these should work:
$api->get('ping');
$api->get('/ping');
$api->get('/ping/');
The PHP client should work like the Python client does and ensure leading and trailing slashes, it should remove duplicate slashes etc. ensuring a clean URL. This should not be a concern for the human user.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.