Closed (fixed)
Project:
Ubercart Marketplace
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2009 at 12:58 UTC
Updated:
30 Jan 2010 at 03:50 UTC
Hi all,
In mp_file_commit function, it would be useful to add the new filename and the new filepath of the file after renaming and copying it:
<?php
function mp_file_commit($node, $file_path, $description, $title, $fid) {
[...]
// Finally, copy the file to a more secure directory
copy($file_path, $dir . $new_name);
// Update node for further reuse
$node->new_filename = $new_name;
$node->new_filepath = $dir . $new_name;
[...]
}
?>
At least, it is useful to me...
Best regards.s
K.
Comments
Comment #1
syndicateStorm commentedSee the latest 6.x dev release. Specifically hook_mpf_new_file_name allows you to manipulate the file names before they are copied. You state you would like to add this information "after", but I'm assuming that "before" would work fine for you?
Let me know if/how this works for you.
Comment #2
syndicateStorm commentedmp_file has changed significantly. If you are having a similar problem with the latest dev release, post it as a new issue.