mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-28 19:06:19 -05:00
Adding feature so that tags can be applied when uploading files.
This commit is contained in:
parent
63738bd70f
commit
f3439c2bd5
7 changed files with 80 additions and 12 deletions
|
|
@ -9,9 +9,10 @@ import Grid from "semantic-ui-react/dist/commonjs/collections/Grid";
|
|||
import {Form as SForm} from "semantic-ui-react";
|
||||
|
||||
export function Upload({disabled}) {
|
||||
const {setFiles, progresses, destination, setDestination, doClear} = useUploadFile();
|
||||
const {t} = React.useContext(ThemeContext);
|
||||
|
||||
const {setFiles, progresses, destination, setDestination, doClear, tagsSelector} = useUploadFile();
|
||||
|
||||
const onDrop = React.useCallback(async (acceptedFiles) => {
|
||||
if (acceptedFiles && acceptedFiles.length > 0) {
|
||||
setFiles(acceptedFiles);
|
||||
|
|
@ -70,6 +71,7 @@ export function Upload({disabled}) {
|
|||
<SForm.Field required>
|
||||
<label>Destination</label>
|
||||
<DirectorySearch onSelect={handleDestination} disabled={disabled}/>
|
||||
{tagsSelector}
|
||||
</SForm.Field>
|
||||
</Form>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue