Frappe Cloud Support Partners Foundation Frappe School

I cannot save a new document with a file attached to an attach field (custom doctype)

I am trying to upload a file to a custom doctype (with a field Attach). I attach my file before saving the doc, from my device:

When I save the new document with an attachment, I get this error message (it means: "file /private/files/MyFile.txt does not exist):

For debug, I looked into the JS console where I found this error:

I also had a look into the network history where I found a response “DoesNotExistError” to the request to /api/method/upload_file

But, once the document is saved, when I change the attached file or reload it from the attach field


Then, the file is correctly uploaded:

Do you have any idea where this error comes from ? Is it a bug ?

Some context:

  • frappe version: 13.12.1
  • I am the Administrator, I have all the permissions.
  • The folder /private/files is owned by the user frappe on the system.