Comments (7)
You can turn on some logging by setting the DEBUG const to true in the library. That will write more detailed information to the default PHP error log.
I just ran some tests and found no issues with the current upload functionality. Would you mind posting your code?
from codeigniter-dropbox-api-library.
Setting the debug const to true seemed to have no impact on the error text. For my code, I'm using the example controller, with the exception of adding my own keys. Also, in test_dropbox(), I have this, directly after $dbobj = $this->dropbox->account():
var_dump($this->dropbox->add("cards.pdf", getcwd()."/assets/pdf/1.pdf"));
That produces this:
object(stdClass)#18 (1) { ["error"]=> string(9) "Forbidden" }
from codeigniter-dropbox-api-library.
The DEBUG flag does not change the error text. It logs debug information to the PHP error log you need to check your log. That said have you tried "/cards.pdf" as the path on the dropbox?
from codeigniter-dropbox-api-library.
I've tried "/cards.pdf" as well. Here's what that got me in the log:
[06-May-2013 21:07:30] Array
(
[url] => https://api-content.dropbox.com/1/files/dropbox/cards.pdf?file=%2Fhome%2Frebelwar%2Fpublic_html%2Fcards%2Fassets%2Fpdf%2F1.pdf
[content_type] => application/json
[http_code] => 403
[header_size] => 182
[request_size] => 636
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.596009
[namelookup_time] => 0.002087
[connect_time] => 0.039729
[pretransfer_time] => 0.14853
[size_upload] => 26004
[size_download] => 22
[speed_download] => 36
[speed_upload] => 43630
[download_content_length] => -1
[upload_content_length] => 26004
[starttransfer_time] => 0.1883
[redirect_time] => 0
[request_header] => POST /1/files/dropbox/cards.pdf?file=%2Fhome%2Frebelwar%2Fpublic_html%2Fcards%2Fassets%2Fpdf%2F1.pdf HTTP/1.1
Accept: /
Host: api-content.dropbox.com
Connection: close
User-Agent: CodeIgniter
Accept-encoding: identity
Authorization: OAuth oauth_consumer_key="['key removed]", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1367892450", oauth_nonce="192e8ad710a53308b6d39d6a31a9e956", oauth_version="1.0", oauth_token="l32csjssl11na9u", oauth_signature="otUSurC7ap59wv1KdzP%2FTiz6clc%3D"
Content-Length: 26004
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------82582d314e22
)
[06-May-2013 21:07:30] {"error": "Forbidden"}
from codeigniter-dropbox-api-library.
What type of app did you register? Is it "Full Dropbox" or "App Folder"? The DEFAULT_ROOT parameter if you didn't change it is for Full Dropbox. You will need to make sure the DEFAULT_ROOT matches the app type you register.
from codeigniter-dropbox-api-library.
It was "App folder". Looks like you nailed the problem - switching DEFAULT_ROOT to "sandbox" did the trick. Thanks for the help.
from codeigniter-dropbox-api-library.
Please don't promote your own libraries here. - Jimdoescode
from codeigniter-dropbox-api-library.
Related Issues (15)
- dropbox -> Dropbox HOT 4
- i am not able to upload file HOT 2
- Upload Issue HOT 4
- Outdated version HOT 2
- undefined index : oauth_token HOT 19
- Expecting A file Upload Error HOT 2
- http 400 file: expecting a file upload HOT 2
- Upload File Issue HOT 1
- Url Encode Special Chars in path HOT 1
- Store in db? Method missing in docs HOT 2
- add parameters at /shares HOT 1
- logging HOT 3
- return value of _content_request is missing HOT 7
- No support for chunked_upload HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeigniter-dropbox-api-library.