https://github.com/aaronksaunders/simple-file-upload-hook-vue
create a simple vue-composition function for uploading a file to firebase storage.
https://github.com/aaronksaunders/simple-file-upload-hook-vue
file-upload firebase javascript vue vue-composition-api vuejs
Last synced: 3 months ago
JSON representation
create a simple vue-composition function for uploading a file to firebase storage.
- Host: GitHub
- URL: https://github.com/aaronksaunders/simple-file-upload-hook-vue
- Owner: aaronksaunders
- Created: 2019-12-12T06:42:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T16:55:21.000Z (over 2 years ago)
- Last Synced: 2025-01-21T20:11:25.078Z (5 months ago)
- Topics: file-upload, firebase, javascript, vue, vue-composition-api, vuejs
- Language: JavaScript
- Homepage: https://dev.to/aaronksaunders/vuejs-composition-api-sample-app-w-video-d04
- Size: 4.21 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# simple-file-upload-hook-vue
This code is a continuation of a [series of blog posts](https://dev.to/aaronksaunders/vuejs-composition-api-sample-app-w-video-d04) where we have create [react-hook](https://reactjs.org/docs/hooks-intro.html) functionality using the new [vuejs](https://vuejs.org) [vue-composition](https://github.com/vuejs/composition-api) api functionality from vuejs. The series starts with a basic compisition function and then shows how to create hooks that save the data to Firebase.In this last post in the series we create a simple [vue-composition](https://github.com/vuejs/composition-api) function for uploading a file to [firebase storage](https://firebase.google.com/docs/web/setup?authuser=0).
## Firebase configuration
you will need to create a `src/.env.firebase.local` and put your own project information for firebase. The file is structured similar to this:
```javascript
export default {
/* YOUR CONFIGURATION GOES HERE */
apiKey: "AIz99999TTdjRdmEt_00000000000-Mv0M",
authDomain: "00000000000-10000.firebaseapp.com",
databaseURL: "https://00000000000-10000.firebaseio.com",
projectId: "00000000000-10000",
storageBucket: "00000000000-10000.appspot.com",
messagingSenderId: "00000000000-10000",
appId: "1:00000000000-10000:web:00000000000-10000"
};
```
>Information for setting up your project to use firebase [Firebase Project Setup](https://firebase.google.com/docs/web/setup?authuser=0)## Project setup
```
yarn install
```### Compiles and hot-reloads for development
```
yarn run serve
```### Compiles and minifies for production
```
yarn run build
```### Run your tests
```
yarn run test
```### Lints and fixes files
```
yarn run lint
```### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).