Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8182065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:43:58+00:00 2026-06-07T00:43:58+00:00

How do I upload a file, move it to a directory and keep the

  • 0

How do I upload a file, move it to a directory and keep the filename while overwriting any existing file? In Zend Framework.

This maintains the tmp filename (like php3382.tmp)

$adapter = new Zend_File_Transfer_Adapter_Http();
$adapter->setDestination('data/');
$adapter->addFilter('Rename', array(
    'target' => 'data/',
    'overwrite' => true
));

$adapter->receive();

and this doesn’t overwrite

$adapter = new Zend_File_Transfer_Adapter_Http();
$adapter->setDestination('data/');
$adapter->receive();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:43:59+00:00Added an answer on June 7, 2026 at 12:43 am

    Try this:

    ...
    
    $adapter->addFilter('Rename', array('overwrite'=> true,
                                        'target'=> sprintf('data/%s', 
                                                           $adapter->getFileName()),
                                        ));
    $adapter->receive();
    
    ....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting this error when trying to configure the upload directory with Apache
I'd like to upload file out of the *public_html* directory, because of security reasons,
I am trying to move an uploaded file onto a remote server, this isn't
Quick question I am trying to move an uploaded file to a directory outside
Attempting to move an uploaded file so that it is saved in the directory,
I took this basic upload file script from php.net and it is giving two
yesterday i started coding an upload file for uploading images to a directory. as
I want to upload file to a host by using WebClient class. I also
I am trying to upload file to an sharepoint online server using webclient. Up
I was trying to upload file(s) using PrototypeJs request method but I failed. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.