Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form onSubmit={handleSubmit}>
- <TextField
- // Single song file Input
- id="music-upload"
- name="file"
- type="file"
- required
- inputProps={{
- style: { color: 'white' },
- accept: 'audio/*',
- }}
- onChange={handleChange('singleFile')}
- />
- {values.selectSingleFile ? (
- <div>
- <p>Filename: {values.singleFile.name}</p>
- <p>Filetype: {values.singleFile.type}</p>
- <p>Size: {fileSizeFormatter(values.singleFile.size)}</p>
- <p>
- Last modified:{' '}
- {values.singleFile.lastModifiedDate.toLocaleDateString()}
- </p>
- </div>
- ) : (
- <p>Select a file to show details</p>
- )}
- <FormControl>
- <TextField
- // Single song Title
- label="Song title"
- name="title"
- value={values.singleTitle}
- inputProps={{
- style: { color: 'white' },
- }}
- required
- autoComplete="off"
- onChange={handleChange('singleTitle')}
- />
- </FormControl>
- <br />
- <br />
- <FormControl>
- <TextField
- // Single song Artist name
- label="Artist"
- name="artist"
- value={values.singleArtist}
- inputProps={{
- style: { color: 'white' },
- }}
- required
- onChange={handleChange('singleArtist')}
- />
- </FormControl>
- <br />
- <br />
- <CustomButton
- // Single song upload button
- name="Upload"
- col="black"
- buttonColor="green-button"
- onSubmit={handleSubmit}
- />
- </form>
Advertisement
Add Comment
Please, Sign In to add comment