content_dict = download_from_gdrive(file_dict, http, extension)
-
# Get a new copy of the file from the database with the new metadata from filemeta
new_note = Note.objects.get(id=note.id)
+
if extension.lower() == '.pdf':
new_note.file_type = 'pdf'
-
elif extension.lower() in ['.ppt', '.pptx']:
new_note.file_type = 'ppt'
now = datetime.datetime.utcnow()
_writer.write(content_dict['pdf'])
_writer.close()
-
new_note.pdf_file = _path
else:
new_note.text = content_dict['text']
# before we save new html, sanitize a tags in note.html
- new_note.sanitize_html(save=False)
+ #new_note.sanitize_html(save=False)
+ #FIXME: ^^^ disabled until we can get html out of an Etree html element
# Finally, save whatever data we got back from google
new_note.save()