import {JSX} from 'preact';

export default function UploadButton(props: JSX.HTMLAttributes<HTMLInputElement>) {

    return(
        <form action="/analyze" method="post" encType="multipart/form-data">
            <input 
            {...props}
            name="packagefile"
            type="file"
            accept={".json"}
            // onChange={getFileData}
        />
        <button type="submit">Submit</button>
        </form>
    );
}