
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
gatsby-source-dropbox
Advanced tools
Source plugin for getting data from Dropbox account.
npm install --save gatsby-source-dropbox
Configure the plugin
// In your gatsby-config.js
plugins: [
{
resolve: `gatsby-source-dropbox`,
options: {
accessToken: `access-token`,
extensions: ['.pdf', '.jpg', '.png', '.md'],
path: '/path/to/folder',
recursive: false,
createFolderNodes: false,
},
},
]
createFolderNodes: false
The plugin provides some basic information of the remote files such as:
The plugin makes use of the create remote node API of gatsby to locally download all the files in order to use them with other transformer plugins such as gatsby-transformer-sharp for images or gatsby-transformer-remark for markdown files.
Example:
query {
allDropboxNode {
edges {
node {
id
name
lastModified
path
localFile {
childMarkdownRemark {
html
}
}
}
}
}
}
createFolderNodes: true
By setting this to true, you will get the following types in graphql:
allDropboxFolder
allDropboxImage
allDropboxMarkdown
allDropboxNode # everything that's not one of the above, will be of this type
You can now easily query for files within a folder. Lets say you have a simple portfolio structured like this on your dropbox:
.
+-- Project-01-Lorem-Name
| +-- Description.md
| +-- Gallery-Image-01.jpg
| +-- Gallery-Image-02.jpg
+-- Project-02-Ipsum-Name
| +--Description.md
| +--Gallery-Image-01.jpg
| +--Gallery-Image-02.jpg
You can now query like following in gatsby-node.js
and create project pages with a corresponding template:
query MyQuery {
allDropboxFolder(filter: {name: {regex: "/Project/"}}) {
group(field: name) {
nodes {
name
dropboxImage {
localFile {
childImageSharp {
fluid {
src
}
}
}
}
dropboxMarkdown {
localFile {
childMarkdownRemark {
html
}
}
}
}
}
}
}
FAQs
Gatsby source plugin for creating nodes from dropbox API
The npm package gatsby-source-dropbox receives a total of 0 weekly downloads. As such, gatsby-source-dropbox popularity was classified as not popular.
We found that gatsby-source-dropbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.