
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@kfcoding/image-upload
Advanced tools
An image-uploader based on ant design (https://ant.design/)

$ npm install --save @canner/image-upload
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import ImageUpload from '../src/index';
class Demo extends Component {
constructor(props) {
super(props);
this.showPopup = this.showPopup.bind(this);
this.closePopup = this.closePopup.bind(this);
this.state = {
popup: false
};
}
showPopup() {
this.setState({
popup: true
});
}
closePopup() {
this.setState({
popup: false
});
}
onChange(value) {
console.log(value)
}
render() {
return (
<div>
<button onClick={this.showPopup}>show edit</button>
<ImageUpload
closeEditPopup={this.closePopup}
editPopup={this.state.popup}
onChange={this.onChange}
multiple={true}
/>
</div>
);
}
}
ReactDOM.render(
<Demo/>
, document.getElementById('root'));
| Name | Type | Default | Description |
|---|---|---|---|
| locale | string | 'en' | Set locale |
| localeMessages | localeMessages: {[string]: string} | see src/locale/en.js | Locale messages |
| onChange | (value: string | Array<string>) => void | null | called every change, if multiple to true value is an array. |
| closeEditPopup | () => void | null | called when close |
| editPopup | boolean | false | should popup show or not |
| multiple | boolean | false | allow upload multiple images or not. |
| galleryConfig | Array<{name: string, gallery: Array<{ url: string, name: string }>}> | null | default value see src/config.js | Setup albums for users to choose, in Gallery tab, disable if set to null. |
| serviceConfig | depends on services | undefined | pass image configurations generate from: https://github.com/Canner/image-service-config |
This package support i18n, currently support languages:
Usage: import specific locale messages from lib folder, and pass it into localeMessages props.
import zhTWLocale from '@canner/image-upload/lib/locale/zh_tw';
<ImageUpload
locale="zh"
localeMessages={zhTWLocale}
{...otherProps}
/>
npm start
Apache-2.0 © Canner
FAQs
image uploader
We found that @kfcoding/image-upload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.