| Name | Type | Default |
|---|---|---|
| autoUpload | boolean | false |
|
Sets or gets whether files will be automatically uploaded when selected. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| accept | string | null |
|
Sets or gets the file types that can be submitted to the server through jqxFileUpload. This property corresponds to the
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| browseTemplate | FileUploadTemplate | '' |
|
FileUploadTemplate: "default" | "primary" | "success" | "warning" | "danger" | "inverse" | "info" | "link"
Sets or gets the template applied to the 'Browse' button. Possible Values:
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| cancelTemplate | FileUploadTemplate | '' |
|
FileUploadTemplate: "default" | "primary" | "success" | "warning" | "danger" | "inverse" | "info" | "link"
Sets or gets the template applied to the 'Cancel All' button. Possible Values:
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| disabled | boolean | false |
|
Enables or disables the jqxFileUpload. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| fileInputName | string | '' |
|
Sets or gets the /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| height | number | string | 'auto' |
|
Sets or gets the jqxFileUpload's height. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| localization | FileUploadLocalization | null |
|
Interface FileUploadLocalization {
browseButton?: string; uploadButton?: string; cancelButton?: string; uploadFileTooltip?: string; cancelFileTooltip?: string; } Sets the various text values used in the widget. Useful for localization. The localization object has the following fields:
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
constructor(props: {}) {
super(props);
this.state = {
localization: { browseButton: 'Blättern', uploadButton: 'Laden Sie alle', cancelButton: 'alle Abbrechen', uploadFileTooltip: 'Datei hochladen', cancelFileTooltip: 'aufheben' }
}
}
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| multipleFilesUpload | boolean | true |
|
Sets or gets whether multiple files selection and upload are allowed. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| renderFiles | (filename:FileUploadRenderFiles['fileName']) => void | null |
|
Interface FileUploadRenderFiles {
fileName?: string; } A callback function used for rendering the file selection rows. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
constructor(props: {}) {
super(props);
this.state = {
renderFiles: (fileName: string): any => {
return fileName.toUpperCase();
}
}
}
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| rtl | boolean | false |
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| theme | string | '' |
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| uploadUrl | string | '' |
|
Sets or gets the upload URL. This property corresponds to the upload form's <?php A few notes about file uploads in PHP: Many shared hosting servers allow a very low maximum file upload size. If you plan on accepting larger files, you should consider a dedicated or virtual dedicated server. To adjust the file upload size in PHP, modify the php.ini file's "upload_max_filesize" value. You can also adjust this value using PHP's .ini_set() function. The file upload counts towards the hosting environment's $_POST size, so you may need to increase the php.ini file's post_max_size value. Be sure to do a lot of file validation when allowing users to upload files. How horrible would it be to allow a user to upload a .exe file to your server? They could do horrible things on the server. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| uploadTemplate | FileUploadTemplate | '' |
|
FileUploadTemplate: "default" | "primary" | "success" | "warning" | "danger" | "inverse" | "info" | "link"
Sets or gets the template applied to the 'Upload All' button. Possible Values:
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| width | string | number | null |
|
Sets or gets the jqxFileUpload's width. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
Events |
||
| remove | Event | |
|
This event is triggered when a file row has been removed. Code examples
Bind to the
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
private onRemove(e: Event): void {
alert('do something...');
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| select | Event | |
|
This event is triggered when a file has been selected. Code examples
Bind to the
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
private onSelect(e: Event): void {
alert('do something...');
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| uploadStart | Event | |
|
This event is triggered when a file upload operation has started. Code examples
Bind to the
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
private onUploadStart(e: Event): void {
alert('do something...');
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| uploadEnd | Event | |
|
This event is triggered when a file upload operation has ended. Code examples
Bind to the
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
private onUploadEnd(e: Event): void {
alert('do something...');
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
Methods |
||
| Name | Arguments | Return Type |
| browse | None | |
|
Browses for a file. Due to browser restrictions, this method would not work on Internet Explorer 9 or earlier. |
||
| cancelFile | fileIndex | |
|
Cancels a selected file. |
||
| cancelAll | None | |
|
Cancels all selected files. |
||
| destroy | None | |
|
Destroys the jqxFileUpload. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public componentDidMount(): void {
this.myFileUpload.current!.destroy();
}
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| render | None | |
|
Renders the widget. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public componentDidMount(): void {
this.myFileUpload.current!.render();
}
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| refresh | None | |
|
Refreshes the widget. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxFileUpload, { IFileUploadProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxfileupload';
class App extends React.PureComponent<{}, IFileUploadProps> {
private myFileUpload = React.createRef<JqxFileUpload>();
public componentDidMount(): void {
this.myFileUpload.current!.refresh();
}
public render() {
return (
<div>
<p>Note: to be able to upload a file you would have to set the property uploadUrl to point to a file hosted on your server, which handles the upload process.</p>
<JqxFileUpload ref="myFileUpload" />
</div>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| uploadFile | fileIndex | |
|
Uploads a selected file. |
||
| uploadAll | None | |
|
Uploads all selected files. |
||