mirror of
https://github.com/discourse/discourse.git
synced 2025-03-01 08:49:20 +00:00
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…
x
Reference in New Issue
Block a user