Solved

download to folder

Posted on 2014-11-07
2
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
Kimputer earned 250 total points
ID: 40428378
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 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 40428427
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
This article discusses how to create an extensible mechanism for linked drop downs.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

749 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