So I have configured a hook on hooks.py
, write_file = "app.hooks.attachment"
where the method is like this
def attachment(doc):
url = upload_to_digitalocean()
return {"file_name": doc.file_name, "file_url": url}
This is based on source code . But when after uploading the file and returning the dictionary I get OSError: File does not exist
This seems to happens on validate_file_on_disk() method.
Question is; If I want to upload certain file to remote, how can I bypass this check?