![NIST Misses 2024 Deadline to Clear NVD Backlog](https://cdn.sanity.io/images/cgdhsj6q/production/8435754fe16c9e8b9d590302937729fe968fffe0-600x527.png?w=400&fit=max&auto=format)
Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@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')
The best place to get started is at our: React-Uploady Documentation Website
#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 |
shouldRemoveDragOver | ShouldRemoveDragOverMethod | undefined | callback to help identify when to remove the onDragOverClassName. Receives the dragleave event |
shouldHandleDrag | boolean or ShuoldHandleDragMethod | undefined | Whether drag&drop should be handled, either boolean or method returning boolean |
enableOnContains | boolean | true | By default will handle drag-enter for children of the container and not just the container itself |
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.
Can be a boolean or a method returning a boolean. In case of a method, the drag event will be provided as a param.
In case shouldHandleDrag === false, the drag&drop flow will not be handled by this component. In case you want to enable logic to determine whether drag&drop will be enabled, pass a callback for this prop. Returning a Falsy value will disable DnD, returning Truthy will keep it enabled.
By default, handles Drop event by calling getFilesFromDragEvent from html-dir-content.
In case you want to provide your own logic that will calculate the items(files) passed to the uploader from the drop event, pass in a custom handler.
You can still get the files as the internal method does, by calling getFiles passed to the custom dropHandler as the second param.
Gives more control over when to recognize drag-over is done and indicator should be cleared
See further explanation on our doc site
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
maxGroupSize={3}
>
<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.
1.4.0 (2023-02-18)
[tus-sender]
- added new event tus RESUME_START to: cancel or update relevant props for resume[tus-sender]
- accept resume headers in tus options[tus-uploady]
- added useTusResumeStartListener hook to handle RESUME_START event in React[upload-preview]
- added removePreview to preview methods to clear a single item preview[uploader]
- fix bug with cancel from BATCH_ADD doesnt clean batch from state. Fix for #472[uploader]
- fix bug with item handling after async batch start (c5ed0dd)root
- Update gzip sizes table in readmeall
- upgrade dev deps (jest, babel, flow, lerna!, and more)all
- misc upgrade dev depsFAQs
drop zone (container) component to initiate file and folder content uploads
The npm package @rpldy/upload-drop-zone receives a total of 4,700 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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.