frappe-client
frappe-client copied to clipboard
add methods to GET/PUT file attachments
frappe-client doesn't have methods to fetch attachments for a given document. The meta data is available using get_doc as shown below.
return wn.get_doc(
'File Data',
filters=[
['File Data', 'attached_to_doctype', '=', doctype],
['File Data', 'attached_to_name', '=', docname]],
fields=['name','file_name','file_url', 'file_size'])
Methods to fetch and post attachments would be very useful.
@jevonearth, do you need this? I can release in https://github.com/frappe/frappe-client/pull/12
Oh yes, this will be super helpful. Thanks @MaxMorais !
@jevonearth, can you describe the functions that do you need?
Attachment upload Attachment download Attachment delete
Other?
Can't think of any, I think we can already list attachments.
If there are many attachments, do you favour that the caller just requests each by iterating on the attachment list?