mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-22 00:52:43 +01:00
Fix #2253
This commit is contained in:
parent
1e58e108ba
commit
773c42e4f2
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 33 KiB |
@ -45,7 +45,7 @@ export default ({ withinFileEditor, isNewFile }: Props) => {
|
||||
|
||||
return (
|
||||
<div css={tw`flex items-center text-sm mb-4 text-neutral-500`}>
|
||||
{(files && files.length && !params?.action) &&
|
||||
{(files && files.length > 0 && !params?.action) &&
|
||||
<FileActionCheckbox
|
||||
type={'checkbox'}
|
||||
css={tw`mx-4`}
|
||||
|
@ -11,6 +11,7 @@ import useEventListener from '@/plugins/useEventListener';
|
||||
import SpinnerOverlay from '@/components/elements/SpinnerOverlay';
|
||||
import useFlash from '@/plugins/useFlash';
|
||||
import useFileManagerSwr from '@/plugins/useFileManagerSwr';
|
||||
import { ServerContext } from '@/state/server';
|
||||
|
||||
const InnerContainer = styled.div`
|
||||
max-width: 600px;
|
||||
@ -23,6 +24,7 @@ export default () => {
|
||||
const [ loading, setLoading ] = useState(false);
|
||||
const { mutate } = useFileManagerSwr();
|
||||
const { clearFlashes, clearAndAddHttpError } = useFlash();
|
||||
const directory = ServerContext.useStoreState(state => state.files.directory);
|
||||
|
||||
useEventListener('dragenter', e => {
|
||||
e.stopPropagation();
|
||||
@ -60,7 +62,7 @@ export default () => {
|
||||
setLoading(true);
|
||||
clearFlashes('files');
|
||||
getFileUploadUrl(uuid)
|
||||
.then(url => axios.post(url, form, {
|
||||
.then(url => axios.post(`${url}&directory=${directory}`, form, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user