Skip to content

Multifile upload #51

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

Closed
wants to merge 4 commits into from
Closed

Multifile upload #51

wants to merge 4 commits into from

Conversation

jankapunkt
Copy link
Collaborator

Attempt to fix #3 with a real multiple file select that automatically adds all selected files to an Autoform Array list. Updated README documentation about that part, too. Backwards compatible and also allows single files within multiple files, too.

@dr-dimitru if this okay so far, would you bump the version and release, please?

@jankapunkt
Copy link
Collaborator Author

This is closed and will be reopened , once #53 is merged, because #53 respects to pass these config flags (backward compatible) to custom templates while this PR does not. Chages should be done accordingly to pass multiple as config flag via uploadTemplateData:

  uploadTemplateData() {
    const instance = Template.instance();
    const currentUpload = instance.currentUpload.get();
    const { accept } = instance;
    const { multiple } = instance;

    // here we can check for upload template configs, that have been added after 2.1.4 and return either
    // an object with "config" merged with "currentUpload" to stay backwards compatible as popssible
    if (accept || multiple) {
      const config = { config: { accept, multiple } };
      return Object.assign({}, config, currentUpload);
    } else {
      return currentUpload;
    }
  },

@jankapunkt jankapunkt closed this May 22, 2019
@roblingle
Copy link

@jankapunkt Can this be re-opened and merged now?

@jankapunkt
Copy link
Collaborator Author

Hi @roblingle yes and no, I closed it, since it contained partial code from the pr #52 and I did not wanted to mess up the code base. However, I should open a new WIP branch, where the multifile code is integrated. I got it working once, so it should not be that hard to do it again. Thank you for your interest in this PR.

@jankapunkt
Copy link
Collaborator Author

@roblingle there is a new PR: #58 and the branch is multiple2. You can clone and switch to the multiple2 branch and check if this is sufficient for your use case. Feel free to comment the PR about any issue with the feature. A short review would be great.

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

Successfully merging this pull request may close these issues.

Multiple files vs single files
2 participants