frappe / frappe-ui

A set of components and utilities for rapid UI development
https://frappeui.com
MIT License
256 stars 109 forks source link

fix: file uploader: consider `doctype` & `docname` separately #111

Closed ssiyad closed 11 months ago

ssiyad commented 11 months ago

In FileUploader, doctype is ignored if docname is not present. This PR change the behaviour to consider doctype, docname and fieldname as separate, unrelated properties. Please let me know if there is a reason to couple doctype and docname together.

netlify[bot] commented 11 months ago

Deploy Preview for frappeui ready!

Name Link
Latest commit bac44d60b56454ba100fb203568873c691934ddd
Latest deploy log https://app.netlify.com/sites/frappeui/deploys/653f8c06a1486f000829ec49
Deploy Preview https://deploy-preview-111--frappeui.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netchampfaris commented 11 months ago

@ssiyad what is the case when doctype has to be set without docname?

ssiyad commented 11 months ago

It useful when the doc is not yet created but you still have to upload files for it. By referencing a doctype, you can technically 'claim' it for your app. Which is not ideal but I think it might be slightly better than current implementation