fix: Allowed guest to attach files to web forms (#7017)
Created the fix for the issue [#6774](https://github.com/frappe/frappe/issues/6774), in which guest can attach files in web forms like job application.
This commit is contained in:
parent
9df07891ff
commit
245a8186af
1 changed files with 2 additions and 2 deletions
|
|
@ -429,7 +429,7 @@ def get_random_filename(extn=None, content_type=None):
|
|||
|
||||
return random_string(7) + (extn or "")
|
||||
|
||||
@frappe.whitelist()
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
def validate_filename(filename):
|
||||
from frappe.utils import now_datetime
|
||||
timestamp = now_datetime().strftime(" %Y-%m-%d %H:%M:%S")
|
||||
|
|
@ -450,4 +450,4 @@ def add_attachments(doctype, name, attachments):
|
|||
f = save_url(attach.file_url, attach.file_name, doctype, name, "Home/Attachments", attach.is_private)
|
||||
files.append(f)
|
||||
|
||||
return files
|
||||
return files
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue