Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

download to folder

Posted on 2014-11-07
2
Medium Priority
?
174 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 36

Accepted Solution

by:
Kimputer earned 1000 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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

688 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