Skip to content
This repository was archived by the owner on Nov 19, 2018. It is now read-only.

Single file upload support #154

@arvinsim

Description

@arvinsim

I am trying to

const uploader = new FineUploaderTraditional({
  options: {
    request: {
      endpoint: '<redacted>',
      clockDrift: 500
    },
    validations: {
      itemLimit: 1
    },
    autoUpload: false
  }
})
<FileInput name={name} uploader={uploader} />
{fileId ? <Filename id={fileId} uploader={uploader} /> : null
uploader.on('onSubmitted', id => {
      // This method sets this.state.fileId
      setFileId(id)
})

I tried submitting 3 files. However there are problems with it

  • The <Filename /> code does not update the name of the latest file to be submitted
  • When running uploader.methods.uploadStoredFiles() when submitting, it list all the 3 files as stored, even if I sent the validations.itemLimit option to 1.

Do I have to manually clear stored files using uploader.methods.clearStoredFiles(). If yes, then where do I need to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions