hackingharold / ngx-dropzone Goto Github PK
View Code? Open in Web Editor NEWThe missing file input component for Angular Material.
License: MIT License
The missing file input component for Angular Material.
License: MIT License
Angular 17 is out.
I updated it for you - see my pull request.
Thank you for this great library!
Harold,
is it possible to make a directory selection working not only via drag-n-drop, but also by directly selecting it in Open File dialog? From what I heard, it should work in the majority of browsers, including Chrome...
Also - just in case the information might be in handy - I've actually overridden the handling of the selection to include the information about the relative path of each of the selected files.
Hello
I am implementing the module in an Angular 17 application and following the minimum integration steps, I get the error "The ngx-dropzone
component requires a child of <input type="file" fileInput />
".
This is the code I have implemented:
Component where I use Dropzone:
<image-dropzone>
<input type="file" fileInput [formControl]="fileCtrl" />
</image-dropzone>
Wrapper component for Dropzone:
@Component({
selector: 'image-dropzone',
templateUrl: './dropzone.component.html',
styleUrl: './dropzone.component.scss',
})
/**
* Image dropzone component
*/
export class ImageDropzoneComponent extends DropzoneComponent {
}
And its corresponding HTML template:
<div class="my-dropzone">
<ng-content select="[fileInput]"></ng-content>
</div>
Error displayed on console:
Output rendered in the DOM:
Did I miss any implementation steps?
There is no ability to add an icon in the attribute. Adding a material icon above the placeholder text in ngx-mat-dropzone
would help
I know the documentation says there is intentionally no default preview, but optionally having a default one would help save time from reinventing the wheel of building this to show the preview, styling it etc. If anyone wants to use the default one, they can use it and then override its default styling if necessary. I think this is a much better choice. Could this be added?
I suggest making a parameter in input field or something that will change current behaviour of inserting files. At this moment each time you drag/select files, it creates array of files from 0. Would be nice to have option for appending to array instead of re-assigning array of files.
Hi there!
Thanks for this useful library. Would it be possible to allow for the FileInputValidators validator to have null or empty values? There are cases where I want to limit the types of files to be submitted in a form but the field itself could be optional, but the validator returns false if there is no file so it gets marked as invalid.
This should support RXJS 7 as well
Hi.
Was looking for Drop Zone component for Angular 15 we use...
The old version (predecessor) is created for up to Angular 13 (and we would not like to use an outdated version of Drop Zone).
Your version supports Angular 16+. Why there's a gap and no support for Angular 14-15? :)
Anyway, I've installed your version using --legacy-peer-deps
key. And as I can see from the debug, the dropped folder files are added to the form. But there's nothing in the markup and I can't see the way to fix it (the zone below actually does have files added):
Could you please suggest the way I can fix the markup somehow?
Hello Harold, I really appreciate your great work!
I would like to implement the ability to extract files from folders and subfolders using drag and drop.
If you don't mind, I'll start a pull request in the near future.
Greetings from Bavaria!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.