From c1ab9c9b9ce80ddac3d882ddc2105d27561750b5 Mon Sep 17 00:00:00 2001 From: jonisaa Date: Wed, 10 Aug 2016 09:30:56 -0300 Subject: [PATCH] #2 Start to develop FileUpload --- src/components/field/FileUpload.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/components/field/FileUpload.js b/src/components/field/FileUpload.js index dd2a4db..8742cc7 100644 --- a/src/components/field/FileUpload.js +++ b/src/components/field/FileUpload.js @@ -1,5 +1,22 @@ import React, { Component, PropTypes } from 'react'; +import fetch from 'isomorphic-fetch'; export default class FileUpload extends Component { + static propTypes = { + url: PropTypes.string.isRequired + }; + + onDrop = (files) => { + const { url } = this.props; + + fetch() + .then(response => response.json()) + .then() + .catch() + }; + + render() { + return false; + } } \ No newline at end of file