Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@rpldy/upload-drop-zone
Advanced tools
drop zone (container) component to initiate file and folder content uploads
Drop zone (container) component to initiate file and folder content uploads Supports individual files as well as recursively iterating over a dropped directory to upload its contents.
Uses html-dir-content to process the files/directories in the dnd events (DataTransferItem).
Can easily be combined with other D&D solutions.
Drop Zones can use different configuration overrides that supersede the options passed to the parent Uploady.
Note: Some options cannot be overriden by the button. For example, any prop that influences the file input directly (such as 'multiple')
#Yarn:
$ yarn add @rpldy/uploady @rpldy/upload-drop-zone
#NPM:
$ npm i @rpldy/uploady @rpldy/upload-drop-zone
Name (* = mandatory) | Type | Default | Description |
---|---|---|---|
id | string | undefined | id attribute to pass to the container element |
className | string | undefined | the class attribute to pass to the container element |
onDragOverClassName | string | undefined | class name to add to the container when dragged over |
dropHandler | DropHandlerMethod | undefined | override default handler that returns the drop result (ex: files). May return a promise |
htmlDirContentParams | Object | undefined | will be passed as is to html-dir-content. See docs |
children | React.Node | undefined | child element(s) to render inside the container |
extraProps | Object | undefined | any other props to pass to the div component (with spread) |
In addition, most UploadOptions props can be passed to UploadDropZone. In order to override configuration passed to the parent Uploady component. See Uploady documentation for detailed list of upload options.
Simple example, shows how upload options can be passed to the drop-zone (grouped, maxGroupSize).
import Uploady from "@rpldy/uploady";
import UploadDropZone from "@rpldy/upload-drop-zone";
const App = () => (
<Uploady destination={destination}>
<UploadDropZone onDragOverClassName="drag-over"
grouped={grouped}
maxGroupSize={groupSize}>
<span>Drag&Drop File(s) Here</span>
</UploadDropZone>
</Uploady>);
See story showing how to use a 3rd library: react-dnd together with @rpldy/upload-drop-zone.
0.8.2 (2020-12-09)
[uploader]
- new event ALL_ABORT[uploady]
- new hook: useAllAbortListener[chunked-sender]
- fixed abort flow for chunked sender. Fix for #109e2e
- added chunked abort specFAQs
drop zone (container) component to initiate file and folder content uploads
The npm package @rpldy/upload-drop-zone receives a total of 3,783 weekly downloads. As such, @rpldy/upload-drop-zone popularity was classified as popular.
We found that @rpldy/upload-drop-zone demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.