Coder Social home page Coder Social logo

incuca / ic-firebase-uploader Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 2.0 160 KB

This component is a multi-file uploader for firebase

Home Page: https://bit.dev/incuca/incuca-ui/ic-firebase-uploader

License: Apache License 2.0

JavaScript 35.62% Vue 64.38%
file firebase firebase-storage multi-upload upload uploader vue vue2

ic-firebase-uploader's People

Contributors

klarkc avatar sadortun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ic-firebase-uploader's Issues

Usage example for the uploaded callback

Hi!

I can see that you this.$emit('uploaded'), can you add an attribute to the tag to perform a callback ? Or add an example in the readme on how to catch this event ?

Thanks,
Samuel

run after upload successful

hey im pretty new to vue. i got ic-firebase-uploader to work in my project but now im trying to figure out how to run a function after doUpload() is successful. Any advice? Thank you

add sentfiles to initial-files on uploaded

Please forgive my newbie brain. Your help with the initial-files helped out a lot. Now I have the files showing up when i view the uploader. What I cant figure out now is how to add the files that are uploaded to the initial-files object. Any suggestions?

What I have is an object like this that im uploading to firebase. Im trying to put the files uploaded into resources: []

[
        {
          key: "5mjyfa4",
          title: "Module Title mnn31hf",
          expanded: true,
          isModule: true,
          nested: [
            {
              key: "wuy6zz3",
              title: "Lesson Title kkr55x2",
              description:
                "<p>lorem ipsum sadkfjhn sldkfhlkjsdhn fljnsdjknflkjsdnfkjlnsd jsdjknflkjsdn flkjsdn l</p>",
              resources: [{file1: 'path/to/the/image1, file2: 'path/to/the/image2โ€™}],
              videoEmbedCode: "",
              expanded: true,
              isLesson: true
            },
            {
              key: "z31sgu5",
              title: "Lesson Title t2s696v",
              description:
                "<p>lorem ipsum sadkfjhn sldkfhlkjsdhn fljnsdjknflkjsdnfkjlnsd jsdjknflkjsdn flkjsdn l</p>",
              resources: [],
              videoEmbedCode: "",
              expanded: false,
              isLesson: true
            }
          ]
        },
        {
          key: "lecxccv",
          title: "Module Title u4ud20k",
          expanded: false,
          isModule: true,
          nested: [
            {
              key: "z385lgz",
              title: "Lesson Title iv6bdkn",
              description:
                "<p>lorem ipsum sadkfjhn sldkfhlkjsdhn fljnsdjknflkjsdnfkjlnsd jsdjknflkjsdn flkjsdn l</p>",
              resources: []},
              videoEmbedCode: "",
              expanded: false,
              isLesson: true
            }
          ]
        }
      ];

my template code looks like

                        <IcFirebaseUploader
                          path="lesson-files"
                          max-files="6"
                          :getFileName="getFileName"
                          :storage="getStorage()"
                          :initial-files="item.resources"
                          @upload="onUpload"
                          @uploaded="onUploaded"
                          @delete="onDelete"
                          @deleted="onDeleted"
                          @click="onClick"
                          @error="onError"
                        />

the initial-files is item.resources because everything is in a v-for

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.