Uploading files to S3

Hi.

I am trying to figure out the best way to upload some files to S3.

Do I upload the file the normal way and then instead of

move_uploaded_file($tempFile,$targetFile);

Do I move it to S3 OR is there a better way of doing it…

Will moving the file to S3 render any malicious code useless or could it still be exicuted when/if I use the image/file/pdf etc

Thanks
Chris