Skip to content

Save to firestore after upload photos is not working? #600

Closed
@dirathea

Description

@dirathea

What is the current behavior?
I'm using react-redux-firebase@next with firestore, and tried to use firebase.uploadFiles. The file is uploaded but the record is not saved on firebase even the configuration is already set up :

config

const rrfConfig = {
  userProfile: 'users',
  useFirestoreForProfile: true,
  useFirestoreForStorageMeta: true,
  enableLogging: false,
};

export const rrfProps = {
  firebase,
  config: rrfConfig,
  dispatch: store.dispatch,
  createFirestoreInstance,
};

implementation


const uploadPath = 'images';
class UploadField extends Component {
  onDrop = files => {
    this.props.firebase
      .uploadFiles(uploadPath, files, uploadPath)
      .then(result => {
        console.log(result);
      });
  };

  render() {
    return (
      <Dropzone onDrop={this.onDrop}>
      </Dropzone>
    );
  }
}

export default compose(
  withFirebase
)(UploadField);

What is the expected behavior?

The file uploaded and record is added

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions