File upload question

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
MarceldeHoog
Posts: 4
Joined: 28 Jun 2016, 08:24

File upload question

Post by MarceldeHoog »

When uploading a file in an issue, the file is processed by core/file_api.php. Now my issue is in the following line:

in the function file_add
the line
if( !move_uploaded_file( $t_tmp_file, $t_disk_file_name) )

When I install the plugin PastePicture, I get the ability to paste an image into the file upload field, and that is where things go wrong: The function move_uploaded_file does not view the pasted image as an uploaded file, so it always will fail. When I change the function move_uploaded_file() to rename(), everything works great.

So is there a reason why move_uploaded_file() was chosen?

Thanks, Marcel
Post Reply