GithubHelp home page GithubHelp logo

input-plugin-file's People

Contributors

greenkeeper[bot] avatar scottnath avatar snugug avatar

Watchers

 avatar  avatar

Forkers

scottnath

input-plugin-file's Issues

Bug: not testing against actual file upload output

When files are uploaded and processed with something like [connect-multiparty(https://github.com/expressjs/connect-multiparty) a more complicated object is created than what the validation is actually testing against.

We already have an example of what this should look like in the files fixtures in punchcard.

solution

  1. the fixtures for the tests should be updated to mimic files uploaded
  2. the validation should account for this change

File Preview

I'd like to be able to preview previously uploaded files. Previewing files as they're uploaded is slightly more complicated so I'd like to keep that as a separate story. In addition, Shared Tests will need to be updated in order to ignore value for file fields. This is especially true as the value for a file is going to be an object including it's name, path, and MIME type.

Feature: Preview
  As a content creator
  I want to preview uploaded content
  So that I know content I've uploaded

  Scenario: Image
    Given that I have previously uploaded an image
     When I load a form that includes the uploaded file
     Then I should see the image in a small preview above the file upload button
      And the file's name should be the alt text of the image
      And the image should link to the full version of the image
      And to the right of the image should be the file's name
      And to the file's name should link to the full version of the image

  Scenario: Audio
    Given that I have previously uploaded an audio file
     When I load a form that includes the uploaded file
     Then I should see the audio loaded as a preview above the file upload button
      And I should be able to play the audio if the browser supports that audio file
      And under the audio player should be the file's name
      And the file's name should link to the audio file

  Scenario: Video
    Given that I have previously uploaded an video file
     When I load a form that includes the uploaded file
     Then I should see the video loaded as a preview above the file upload button
      And I should be able to play the video if the browser supports that video file
      And under the video player should be the file's name
      And the file's name should link to the video file

  Scenario: File
    Given that I have previously uploaded file
      And that file is not an image
      And that file is not audio
      And that file is not video
     When I load a form that includes the uploaded file
     Then I should see name of the file above the file upload button
      And the file's name should link to the file

Preview

  • Image
  • Audio
  • Video
  • File

Content Creator: File upload Input Plugin

@scottnath commented on Thu Aug 04 2016

We need file uploads. The core idea is the same for both images and files.

Feature: File uploads
  As a content creator
  I want to upload files during content entry
  So that I may have files as content.

  Scenario: File selection 
    Given that my content type requires me to add a file as data
     When I am entering content in said type
     Then I need to be able to include a file as content
      And I should be able to select a file to upload from my device
      And I should know what file I have selected because it's name is visible after selection.

  Scenario: File types
    Given that my content type requires me to add a file as data
      And that the requirement may be limited to specific file types
     When I am entering content in said type
     Then I should be limited to only allow selection of the file type or types specified by said type.
      And I should not be able to select files which are not that type or types

  Scenario: Upload one file
    Given that my content type limits me to adding only one file as data
     When I am filling in content with a limit to only one file
     Then the file upload input should limit selection to only one file

  Scenario: Validation
    Given that my content type requires me to add a file as data
      And that the requirement is limited to text files
     When I submit a form containing files I'm trying to upload
     Then the validation should check what I have submitted for file uploads
      And it should return an error if any file is not a text file

  • File upload / File upload
  • File upload / File Types accept attribute
  • File upload / One
  • File upload / Validation

@scottnath commented on Wed Sep 28 2016

blocked by research story: #460
should build upon #155


@scottnath commented on Tue Oct 11 2016

research story complete. Un-blocking


@Snugug commented on Mon Oct 31 2016

Would like a file input plugin in order to work through #492 so tackling this first

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • Replaced the old Node.js version in your .nvmrc with the new one
  • The engines config in 1 of your package.json files was updated to the new Node.js version

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Multiple File Upload

LONG_DESCRIPTION

Feature: Multiple
  As a content creator
  I want to upload multiple files at once during content entry
  So that I can reduce the amount of content entry I need to do.

  Scenario: Upload
    Given that my content type requires me to add multiple files as data
      And that a file upload input should allow for multiple files to be selected
     When I am filling in content with a requirement for multiple files on one input
     Then the file upload input should allow selection of multiple files

  Scenario: Validate
    Given that I have uploaded multiple files
     When my uploads are being validated
     Then the each file should be validated separately

Multiple

  • Upload
  • Validate

Delete File

I want to be able to signal to a back-end processor a file that's been uploaded should be deleted

Definitions

  • Preview - As described in #6
Feature: Delete
  As a Content Creator
  I want to be delete an uploaded file
  So that I can not include a previously included file

  Scenario: Signal
    Given I have uploaded a file
     When I want to delete that file
     Then I can check a box that will will allow me delete the unwanted file
      And if the file has a preview, that preview will be removed
      And if I uncheck the box without having uploaded a new file, the preview will return

Delete

  • Signal

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.