Solved

download to folder

Posted on 2014-11-07
2
148 Views
Last Modified: 2014-11-07
Hi, In cakephp I can download a file from the server as below.
It works fine and I get a window to save or open.

I dont want this window appearing as I want to download to a folder on my computer without this window appearing.
How can I code it to save to a specific folder  ?

$filename='Excel/'.$timesheet['TimeSheet']['excel_filename'];
$filesave=$timesheet['TimeSheet']['excel_filename'];
 debug($filename);
 
  $this->response->file($filename, array('download' => true, 'name' => $filesave));

Open in new window

0
Comment
Question by:jagguy
2 Comments
 
LVL 35

Accepted Solution

by:
Kimputer earned 250 total points
Comment Utility
There are standardized security measures. You will have to live with these prompts.
If these prompts aren't in place, I would just make a website where you wouldn't see any prompts of my malware downloading to your windows startup folder, and the next time you start your computer, I would have full control over your PC.
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
Comment Utility
The server can't tell the client whether to save a file, nor where to save it.  Also, the server cannot read a file from the client machine without an affirmative human-initiated signal.  HTTP Client/Server design does not allow it.

You might be able to get around some of this by writing your own browser application, maybe in Flash.  But that would seem like a lot of work, and everyone who wanted to use your site would need to install the application.  Executive summary: Look for another problem to solve.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to count occurrences of each item in an array.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now