Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@flatfile/vuejs
Advanced tools
NOTE: If you upgrading from previous versions (0.x), v3+ comes with some updates & breaking changes
Note that the latest version of @flatfile/vuejs
3+ uses the new @flatfile/sdk
underneath which changes the API surface of interacting with the flatfile adapter entirely.
Read more about these changes here
There is now only 1 required input, and that is :token
(which you must receive from your backend).
Read more about generating a Token here
We've made it really simple for you to get started with Flatfile with our new Flatfile Component. Here's what you'll need to know to get started.
First, install the dependency via npm:
npm install @flatfile/vuejs@3
This will give you access to the <flatfile-button />
component as well as the same basic functionality as our new SDK.
Simply add the import to a component where you want to include the Flatfile vuejs adapter via
import { FlatfileButton } from '@flatfile/vuejs';
export default {
name: 'DemoComponent',
components: {
FlatfileButton,
},
// ...
}
Now in your application simply utilize this new <flatfile-button>
component, but make sure to pass in the 1 required prop, (and/or any optional ones you may need for your application).
:token
(String) [ which you need to get from your backend ]Read more here on how to implement a secure token.
<flatfile-button :token="token">
Upload to Flatfile!
</flatfile-button>
<script>
import { FlatfileButton } from '@flatfile/vuejs';
export default {
name: 'App',
components: {
FlatfileButton,
},
data: () => ({
token: 'Your_Token_You_Received_From_Your_Backend',
})
}
</script>
Here's an example passing down many of the other optional parameters/methods available to the adapter.
<flatfile-button
:token="token"
:onInit="onInit"
:onUpload="onUpload"
:onLaunch="onLaunch"
:onClose="onClose"
:onComplete="onComplete"
:onError="onError"
class="ff-button"
>
Upload to Flatfile!
</flatfile-button>
<script>
import { FlatfileButton } from '@flatfile/vuejs';
export default {
name: 'App',
components: {
FlatfileButton,
},
data: () => ({
token: 'Your_Token_You_Received_From_Your_Backend',
}),
methods: {
onInit: function (data) {
console.log('onInit')
console.log(data)
},
onUpload: function (data) {
console.log('onUpload')
console.log('data')
},
onLaunch: function (data) {
console.log('onLaunch')
console.log('data')
},
onClose: function (data) {
console.log('onClose')
console.log('data')
},
onComplete: function (data) {
console.log('onComplete')
console.log('data')
},
onError: function (error) {
console.log('onError')
console.log(error)
},
}
}
</script>
You can also pass down mountUrl
and apiUrl
to the <flatfile-button>
.
<flatfile-button
:token="token"
:mountUrl="mountUrl"
:apiUrl="apiUrl"
>
Upload to Flatfile!
</flatfile-button>
<script>
import { FlatfileButton } from '@flatfile/vuejs';
export default {
name: 'App',
components: {
FlatfileButton,
},
data: () => ({
token: 'Your_Token_You_Received_From_Your_Backend',
mountUrl: 'mountUrl',
apiUrl: '',
}),
// ... everything else
}
</script>
Update changelog (if needed), update package.json version (semver), add any updates needed for README (if needed), then run the following scripts:
npm run build:lib
npm publish
FAQs
Vue.js flatfile adapter
The npm package @flatfile/vuejs receives a total of 651 weekly downloads. As such, @flatfile/vuejs popularity was classified as not popular.
We found that @flatfile/vuejs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 19 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.