Переглянути джерело

fixes in file manager

version-14
Anand Doshi 12 роки тому
джерело
коміт
e229315d88
1 змінених файлів з 2 додано та 1 видалено
  1. +2
    -1
      webnotes/utils/file_manager.py

+ 2
- 1
webnotes/utils/file_manager.py Переглянути файл

@@ -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')


Завантаження…
Відмінити
Зберегти