Upload file permissions cannot be changed for thumbnail image on upload
Hi,
I've used the upload server behaviour in UE 4 to upload an image field and create a thumbnail but have been having difficulty with the file permissions.
I've followed the threads that explain to change the code from:
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Insert_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "image_upload", "2", "[ExistingFileName]_[Increment]", "false", $WA_UploadResult1_Params);
}
?>
To:
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Insert_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "image_upload", "2", "[ExistingFileName]_[Increment]", "false", $WA_UploadResult1_Params);
chmod($WA_DFP_UploadStatus["WA_UploadResult1"]["serverDirectory"]."".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"], 0644);
}
?>
This works great and changes the permission for the first image but not the second thumbnail image.
For now, the work around I am using is to have two separate server behaviours and two upload file fields but I really do want to be able to do this as I have another page I wish to implement this on.
Hope you can help.