Welcome Guest, Not a member yet? Register   Sign In
Easier Way to Download Files?
#1

[eluser]ShoeLace1291[/eluser]
So... I have a form on my application that users use to upload their resume to my server. In my administrator panel, I need to be able to open these files with a link. I would just open the files directly, however, there are other people that need access to these files as well but do not have ftp access.

I encountered many problems along the way with the download helper. With word files(doc, docx), the downloaded file opens with a bunch of random characters on every page. I did a test run with a file from my own computer. I uploaded it and then opened it with the controller, but it was, again, just a bunch of random characters. The real file was only 3 pages long. In the doc that I downloaded, some pages had a couple lines, others had a full page of random characters.

I also tried using the FTP class with the download function. Apparently that just downloads from the specified remote path and then saves it to the specified local path(e.g. the server, not the client's computer).

I am giving users the option to upload txt, doc, docx, rtf, and pdf files. Is there a method that would work for all of those file types?
#2

[eluser]Massaki[/eluser]
Are you using force_download()?
#3

[eluser]ShoeLace1291[/eluser]
[quote author="Massaki" date="1386849008"]Are you using force_download()?[/quote]

Yes, that's what I mean by download helper. Why can't I just download a file directly instead of getting the contents of the file and creating a new one?
#4

[eluser]ShoeLace1291[/eluser]
bump
#5

[eluser]InsiteFX[/eluser]
KFM File Manager




Theme © iAndrew 2016 - Forum software by © MyBB