Skip to content

aaronksaunders/simple-file-upload-hook-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-file-upload-hook-vue

This code is a continuation of a series of blog posts where we have create react-hook functionality using the new vuejs vue-composition 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 function for uploading a file to firebase storage.

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:

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

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.