My website writes 3 small text files based on users information and then presents these 3 files as links that they must "right click" and save to their desktop.
I would like to keep that, but also somehow offer a way to zip these 3 small files up and force download. And I don't want to save the zip file on the server either. Can this ...
I am running php 5.3, and have bumped into a problem I've not encountered before. I have an upload form (yes, enctype is set to multipart/form-data), that posts stuff to a php page.
The php installation has uploads enabled, and upload_max_filesize is set to .5GB.
Uploading pictures (I've tried up to 50 at a time) works fine. Uploading...
How do I upload images and zip files in RoR? I am a newbie. So please help.
Give me both the view and the controller code example.
Thanks in advance.
...
To quote some famous words:
“Programmers… often take refuge in an understandable, but disastrous, inclination towards complexity and ingenuity in their work. Forbidden to design anything larger than a program, they respond by making that program intricate enough to challenge their professional skill.”
While solving some mundane pro...
In a web app I am working on, the user can create a zip archive of a folder full of files. Here here's the code:
files = torrent[0].files
zipfile = z.ZipFile(zipname, 'w')
output = ""
for f in files:
zipfile.write(settings.PYRAT_TRANSMISSION_DOWNLOAD_DIR + "/" + f.name, f.name)
downloadurl = settings.PYRAT_DOWNLOAD_BASE_URL + "/"...
What are the tradeoffs of the different compression algorithms?
The purpose is backup, transfer & restore. I don't care about popularity, as long as a mature enough tool exists for unix. I care about
time
cpu
memory
compression level
the algorithms I am considering are
zip
bzip
gzip
tar
others?
...
I'm trying to get into the Clojure community. I've been working a lot with Python, and one of the features I make extensive use of is the zip() method, for iterating over pairs of values. Is there a (clever and short) way of achieving the same in Clojure?
...
The zip utility program, when invoked as zip -r out.zip base/* on this directory structure
.
./base
./base/b
./base/b/c
./base/d
creates the following result
adding: base/b/ (stored 0%)
adding: base/b/c (stored 0%)
adding: base/d (stored 0%)
I would like to obtain a file containing data as from the following output
adding:...
I'm having a problem trying to serve a zip file in a JSP.
The zip file is always corrupt after it has finished downloading. I've tried a few different methods for reading and writing, and none of them seem to do the trick.
I figure it is probably adding in ascii characters somewhere as the file will open and display all the filena...
Probably not possible to unzip files natively with dos...so what other ways can i unzip files through the command line? Preferably using open source/free tools
Thanks
...
We have a WSS 3.0 installation with Search Server, which is used to search for documents and Save the search definition to repeat the search later. The users want the option to be able to download all the files in their search results as a one-off Zip file.
I have a very basic solution where the Zipping of the files is done in the web p...
Hello everyone,
Looks like no built-in Library/API in C# to unzip a zip file. I am looking for a free (better open source) library/API which could work with .Net 3.5 + VSTS 2008 + C# to unzip a zip file and extract all files into a specific folder.
Any recommended library/API or samples?
thanks in advance,
George
...
Hi,
I'm trying to create copy/zip a pre-compiled site which is contains empty folders(after pre-compilation). Looks like empty folders is not included to the list of items after CreateItem task.
How I can care of empty folders?
thanks
...
I am using java.util.Zip and java.util.ZipEntry to successfully extra a zip file's contents to disk. I would like to maintain the file permissions set when extracting on a *nix file-system.
Can anyone point me to the "correct" way to do this?
...
How do I get the version attribute of a file?
I tried the "Version" prop but it gives me the same number for all files
My Code:
while (getNextEntry)
{
ZipEntry entry = inStream.GetNextEntry();
getNextEntry = (entry != null);
if (getNextEntry)
{
string fileType = Path.GetExtension(entry.Name);
string vers...
What's the easiest way to zip, say 2 files, from a folder on the server and force download? Without saving the "zip" to the server.
$zip = new ZipArchive();
//the string "file1" is the name we're assigning the file in the archive
$zip->addFile(file_get_contents($filepath1), 'file1'); //file 1 that you want compressed
$zip->addFi...
f = lambda x : 2*x
g = lambda x : x ** 2
h = lambda x : x ** x
funcTriple = ( f, g, h )
myZip = ( zip ( funcTriple, (1, 3, 5) ) )
k = lambda pair : pair[0](pair[1])
# Why do Output # 1 (2, 9, 3125) and Output # 2 ( [ ] ) differ?
print ("\n\nOutput # 1: for pair in myZip: k(pair) ...")
for pair in myZip :
print ( k(pair) )
print (...
I am trying to use the following code: I get a corrupted zip file. Why?
The file names seem OK. Perhaps they are not relative names, and that's the problem?
private void trySharpZipLib(ArrayList filesToInclude)
{
// Response header
Response.Clear();
Response.ClearHeaders();
Response.Cache.SetCa...
Hello,
I barely know a thing about compression, so bear with me (this is probably a stupid and painfully obvious question).
So lets say I have an XML file with a few tags.
<verylongtagnumberone>
<verylongtagnumbertwo>
text
</verylongtagnumbertwo>
</verylongtagnumberone>
Now lets say I have a bunch of these very long tags with...
Can I create Windows XP's Compressed (Zipped) Folder using Delphi?
...