We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
API
5749 TopicsHow do I resolve a 'ReferenceError: document is not defined at document.querySelector'?
I am working through the Dropbox Api tutorial on scrimba (https://scrimba.com/playlist/pnyeEhr) and ( https://scrimba.com/g/gdropbox). I am on the Render Files section. After coding the updateFiles method I am getting a ReferenceError. This may be because I had to change the top lines of code from: /*import { Dropbox } from 'dropbox'; const accessToken = 'myToken'; const dbx = new Dropbox({ accessToken, fetch }); to: require('es6-promise').polyfill(); require('isomorphic-fetch'); var _dropbox = require("dropbox"); const accessToken = '<my access token>'; const dbx = new _dropbox.Dropbox({ accessToken: accessToken, fetch: fetchU }); ---------------------------------- My index.js code is: 'use strict'; require('es6-promise').polyfill(); require('isomorphic-fetch'); var _dropbox = require("dropbox"); const accessToken = 'my Token'; const dbx = new _dropbox.Dropbox({ accessToken: accessToken, fetch: fetch }); //const fileListElem = document.getElementById('.js-file-list') const fileListElem = document.querySelector('.js-file-list'); const state = { files: [] } const init = () => { dbx.filesListFolder({ path: '' }).then(res => { updateFiles(res.entries) }) } const updateFiles = files => { state.files = [...state.files, ...files] renderFiles() } const renderFiles = () => { fileListElem.innerHTML = state.files.sort((a,b) => { // sort alphabetically folders first if ((a['tag'] === 'folder' || b['.tag'] === 'folder') && !(a['.tag'] === b['.tag'])) { return a['.tag'] === 'folder' ? -1 : 1 } else { return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1 } } ).map(file => { const type = file['.tag'] return ` <li class="dbx-list-item ${type}">${file.name}</li> ` } ) } init()Solved77KViews0likes3CommentsCan you embed a Dropbox folder on a website or webpage?
What are good ways to embed dropbox folder in the a webpage like a Google drive for example ? <iframe src="https://drive.google.com/embeddedfolderview?id=1234567890#list" width="100%" height="800" frameborder="0"></iframe>Solved73KViews3likes51CommentsIs there a Upload widget that I can embed on my site?
Hello Dropbox and comminity! I was wondering if there is a dropbox upload widget that I can embed to my site for users to upload files to a specific folder of mine? Sharing is not the only important thing for me you see, we need our visitors to upload their content to us. We would like to set the maximum file size per upload to 2gb. Is this possible with Dropbox today? Thanks! JoeSolved52KViews3likes8CommentsWhich intent to lunch dropbox app to edit text file?
I am on android working with official dropbox app. Which intent and class to lunch dropbox app and direct edit some text file? StartActivity(); Action: android.intent.action.EDIT Package: com.dropbox.android Class: com.dropbox.android.activity.DropboxBrowser Flag: FLAG_ACTIVITY_NEW_TASK Data URI: file://ABC/123.txt Didn't work, it just lunch dropbox app.51KViews3likes6CommentsAPI access token expired
Hi, i am using some of the http api endpoints to upload or download files. As i saw in the documentation the API access tokens never expire but can only be revoked. For some reason after i use my token for a day or so i get the message "expired_access_token". Then i need to create a new one. Of course i never revoked it manually or from the api. I have another account where there i don't have any issue. My token is still working after many months. I followed the same process to create both of them but still they are different. The token for my old account is 64 characters long but the new one is 139 and always starts with "sl.". Am i doing something wrong? Did anything change on how Dropbox is producing access tokens? Thanks in advance for any help.Solved47KViews5likes11Commentsssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)
Hi everyone, I am getting the following error: C:\Python36\Dartfish\Scripts\python.exe C:/Workspace/COC-Dartfish/Dartfish/Dropbox_Download.py SBL Traceback (most recent call last): File "C:\Python36\Dartfish\lib\site-packages\urllib3\connectionpool.py", line 677, in urlopen chunked=chunked, File "C:\Python36\Dartfish\lib\site-packages\urllib3\connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "C:\Python36\Dartfish\lib\site-packages\urllib3\connectionpool.py", line 976, in _validate_conn conn.connect() File "C:\Python36\Dartfish\lib\site-packages\urllib3\connection.py", line 370, in connect ssl_context=context, File "C:\Python36\Dartfish\lib\site-packages\urllib3\util\ssl_.py", line 377, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Program Files\Python36\lib\ssl.py", line 407, in wrap_socket _context=self, _session=session) File "C:\Program Files\Python36\lib\ssl.py", line 817, in __init__ self.do_handshake() File "C:\Program Files\Python36\lib\ssl.py", line 1077, in do_handshake self._sslobj.do_handshake() File "C:\Program Files\Python36\lib\ssl.py", line 689, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python36\Dartfish\lib\site-packages\requests\adapters.py", line 449, in send timeout=timeout File "C:\Python36\Dartfish\lib\site-packages\urllib3\connectionpool.py", line 725, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "C:\Python36\Dartfish\lib\site-packages\urllib3\util\retry.py", line 439, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='content.dropboxapi.com', port=443): Max retries exceeded with url: /2/files/download (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:/Workspace/COC-Dartfish/Dartfish/Dropbox_Download.py", line 95, in <module> dd = DropBoxDownload(args.sportscode) File "C:/Workspace/COC-Dartfish/Dartfish/Dropbox_Download.py", line 39, in __init__ self.process_entries() File "C:/Workspace/COC-Dartfish/Dartfish/Dropbox_Download.py", line 84, in process_entries dbx.files_download_to_file(local_file, entry.path_lower) File "C:\Python36\Dartfish\lib\site-packages\dropbox\base.py", line 1238, in files_download_to_file None, File "C:\Python36\Dartfish\lib\site-packages\dropbox\dropbox.py", line 274, in request timeout=timeout) File "C:\Python36\Dartfish\lib\site-packages\dropbox\dropbox.py", line 365, in request_json_string_with_retry timeout=timeout) File "C:\Python36\Dartfish\lib\site-packages\dropbox\dropbox.py", line 449, in request_json_string timeout=timeout, File "C:\Python36\Dartfish\lib\site-packages\requests\sessions.py", line 578, in post return self.request('POST', url, data=data, json=json, **kwargs) File "C:\Python36\Dartfish\lib\site-packages\requests\sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "C:\Python36\Dartfish\lib\site-packages\requests\sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "C:\Python36\Dartfish\lib\site-packages\requests\adapters.py", line 514, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='content.dropboxapi.com', port=443): Max retries exceeded with url: /2/files/download (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),)) Process finished with exit code 1 To give you context, I am using a python library to download some files, this seemed to be working however I am not sure when it stopped working. However, I just tried this program on my windows 10 machine, and also a spare Linux machine with the same error. I have tried the different solutions provided, but none of them seemed to have worked. If someone can help me out, that'd be really awesome. Appreciate your help. Running: dropbox 10.2.0 Python 3Solved39KViews0likes8CommentsDownloading Dropbox files using curl or wget
I prefer working on a Linux instance through an SSH session. How could I download the Dropbox files directly from the link through a terminal command? I tried the following but it does not work: curl https://www.dropbox.com/t/jdejjd83827HDHH?dl=1 -o test.zip -J -L -k The link in the example above is a made-up link. But the format of the links I receive from a provider is similar. Could someone help?38KViews0likes9CommentsDropbox should respond to Android Intent.ACTION_SEND
My android app uses the code below to allow users to back up an important file. A number of applications, including Google Drive, appear as suitable services to handle the file, but Dropbox does not appear, even though it offers the same functionality as Google Drive. Could you please change Dropbox so that it appears and my users can access it in this way? File F = new File(sdPath); if(F.exists()){ Uri U = Uri.fromFile(F); Intent i = new Intent(Intent.ACTION_SEND); i.setType("file/*"); i.putExtra(Intent.EXTRA_STREAM, U); startActivity(Intent.createChooser(i,"Email/Upload '" + filename + "'")); }36KViews4likes15CommentsDownloading a file from using the Python Dropbox API
Hello, Sorry for the basic question. I'm updating the code I had for the V1 Python API and I'm having a trouble with the download function. Originally I used the following: f, metadata = client.get_file_and_metadata('/' + j) out = open(j) out.write(f.read()) out.close() Where 'j' is just a name of a picture from a list of names; this was what was used in the tutorial for the previous answer. Now, it seems that in the newest version of the API that function is gone and there seem to be two replacements: 'files_download()' and 'files_download_to_file()'. I'm confused because both essentially produce the same type of response: ( dropbox.files.FileMetadata , requests.models.Response ) What would be the correct way to transform the previous methodology to the new one? Thanks,Solved35KViews0likes7CommentsSharing of folders inside the Apps/ folder
I have an application (madoko.net) where users rely on shared folders in dropbox to cooperate. However, I now need to give the application access to a users' entire dropbox and I would like to make it a restricted application under Apps/Madoko. Unfortunately, currently users are unable to share folders inside the Apps subfolder. Since the introduction of the recent sharing API I was hoping to see dropbox supporting this too. Is this feature still planned?? Thanks!, -- Daan34KViews32likes67Comments