Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VueFilePreview component should allow raw file data params like VueFileAgent #18

Closed
safrazik opened this issue Oct 8, 2019 · 0 comments
Milestone

Comments

@safrazik
Copy link
Owner

safrazik commented Oct 8, 2019

Background: Currently the internal VueFilePreview component accepts only an instance of FileData. It would be better to support raw file data similar to the following:

<template>
  <VueFileAgent v-model="filesData"></VueFileAgent><!-- file upload component with preloaded file data -->
  <VueFilePreview v-model="filesData[0]"></VueFilePreview><!-- single file preview -->
</template>
  export default {
    // ...
    data: function(){
      return {
        filesData: [
           // ...
          {
            "name":"DSC_0261.jpg",
            "lastModified":1564648335292,
            "size":65762,
            "type":"image/jpeg",
            "ext":"jpg",
            "url": "https://safrazik.github.io/vue-file-agent/website/assets/files/DSC_0261.jpg"
          },
          // ...
        ]
      },
      // ...
  };

Example use case by @Garito: Reuse Previews #16

@safrazik safrazik added this to the 1.3 Rock Wren milestone Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant