Merge branch 'master' of github.com:webnotes/wnframework
This commit is contained in:
commit
dff20d01f5
1 changed files with 2 additions and 1 deletions
|
|
@ -23,6 +23,7 @@
|
|||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
import os, conf
|
||||
from webnotes.utils import cstr
|
||||
|
||||
def upload():
|
||||
# get record details
|
||||
|
|
@ -94,7 +95,7 @@ def get_uploaded_content():
|
|||
# should not be unicode when reading a file, hence using webnotes.form
|
||||
if 'filedata' in webnotes.form:
|
||||
i = webnotes.form['filedata']
|
||||
webnotes.uploaded_filename, webnotes.uploaded_content = i.filename, i.file.read()
|
||||
webnotes.uploaded_filename, webnotes.uploaded_content = cstr(i.filename), i.file.read()
|
||||
return webnotes.uploaded_filename, webnotes.uploaded_content
|
||||
else:
|
||||
webnotes.msgprint('No File')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue