Fix the import of avatars and attachments
This time for real ;-)
This commit is contained in:
parent
6d813c2b52
commit
8513605421
|
@ -61,9 +61,8 @@ module ImportScripts
|
|||
private
|
||||
|
||||
def copy_to_tempfile(source_path)
|
||||
# extension = File.extname(source_path)
|
||||
# tmp = Tempfile.new(['discourse-upload', extension])
|
||||
tmp = Tempfile.new('discourse-upload')
|
||||
extension = File.extname(source_path)
|
||||
tmp = Tempfile.new(['discourse-upload', extension])
|
||||
|
||||
File.open(source_path) do |source_stream|
|
||||
IO.copy_stream(source_stream, tmp)
|
||||
|
|
Loading…
Reference in New Issue