Backend item "save as copy" does not copy the "file" field contents over. #862
-
Hi, I have a file field that loads an image. I used your tutorial on this and used the example code for the beforesave method and so on. this is the tutorial i used: https://www.youtube.com/watch?v=o482sK4DxkM Now i noticed that when i do a "save & copy" the image is not present in the newly created record. I've looked into the code but i'm can't seem to find anything causing this. Saving the item works just fine. also deleting it. Maybe someone can point me in the right direction as to where to look. Kind regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok i figured it out. it needs some logic to check if the task is save2copy and then get the value from the original database and pass that as the data. There already is similar code to this in the save method by default. Unfortunately we can't just add one line to that code so i had to do another call to the database for this.
|
Beta Was this translation helpful? Give feedback.
Ok i figured it out. it needs some logic to check if the task is save2copy and then get the value from the original database and pass that as the data. There already is similar code to this in the save method by default. Unfortunately we can't just add one line to that code so i had to do another call to the database for this.