FIX: Exporting themes when uploads are on S3

FIX: Exporting themes when uploads are on S3

diff --git a/lib/theme_store/tgz_exporter.rb b/lib/theme_store/tgz_exporter.rb
index deeaadb..7487e82 100644
--- a/lib/theme_store/tgz_exporter.rb
+++ b/lib/theme_store/tgz_exporter.rb
@@ -38,7 +38,7 @@ class ThemeStore::TgzExporter
 
         if ThemeField.types[field.type_id] == :theme_upload_var
           filename = Discourse.store.path_for(field.upload)
-          content = filename ? File.read(filename) : Discourse.store.download(object.upload).read
+          content = filename ? File.read(filename) : Discourse.store.download(field.upload).read
         else
           content = field.value
         end

GitHub sha: b3a41878