Skip to content

Instantly share code, notes, and snippets.

@cfjedimaster
Created April 3, 2023 13:23
Show Gist options
  • Save cfjedimaster/cf4932ba1d66887a7a75e3a5e9169d0e to your computer and use it in GitHub Desktop.
Save cfjedimaster/cf4932ba1d66887a7a75e3a5e9169d0e to your computer and use it in GitHub Desktop.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
dropbox: {
type: "app",
app: "dropbox",
}
},
async run({steps, $}) {
const data = {
"commit_info": {
"autorename": true,
"mode": "add",
"mute": false,
"path": `/PSAPI_Output/${steps.trigger.event.name}`,
"strict_conflict": false
},
"duration": 3600
};
return await axios($, {
method: "post",
url: `https://api.dropboxapi.com/2/files/get_temporary_upload_link`,
headers: {
Authorization: `Bearer ${this.dropbox.$auth.oauth_access_token}`,
"Content-Type": `application/json`,
},
data,
})
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment