You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
static_zip = Tempfile.new('a.zip')
Zip::File.open(static_zip, Zip::File::CREATE) do |z|
files.all do |file|
temp_file = Tempfile.new(filename)
file.download(temp_file.path)
z.add(filename, temp_file.path)
end
end
I've skipped something in between but all the essential parts are in there. After using download() to get the file from Google Cloud, the file was never added into the TempFile that is my zip.
Even when the program spews out a zip file, it can't be opened by any unzip apps (eg., 7zip states that it's not an archive) and it has weird numbers/character after .zip extension when I check the process on the terminal
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've skipped something in between but all the essential parts are in there. After using download() to get the file from Google Cloud, the file was never added into the TempFile that is my zip.
Even when the program spews out a zip file, it can't be opened by any unzip apps (eg., 7zip states that it's not an archive) and it has weird numbers/character after .zip extension when I check the process on the terminal
What am I missing here?
Beta Was this translation helpful? Give feedback.
All reactions