Problem with copying image from one table to another

Hey,

I have two tables (let’s call it A and B). Both have the same picture field.

I create a new record in table B and link it with existing record in table A.

I have a script that when I link those records it copies the picture field from table A to table B.

It’s super easy and it looks something like this:
doo.model.pictureFieldB.setValue(doo.model.tableA.value.pictureFieldA)

For 2 years everything workied perfectly. Now I have a problem. When I try to download this copied picture from table B i get this:

Attachment download failed. Contact your application administrator. Exception of type ‘CorkSolutions.Tabidoo.CoreLib.Exceptions.AttachmentDownloadException’ was thrown. (FileId:‘95162902-2506-4186-a367-1ac2f8f085fa’, ApplicationId:‘f813d698-4dee-4f6e-a62b-2ce582884752’, IsDefinitionImage:False) | GridFS file not found: revision -1 of filename “95162902-2506-4186-a367-1ac2f8f085fa”.

This is the first time I got this message.

Is there another way to copy picture from table A to table B instead of showing the linked field from table A?

Hi,

Attachment download failed. Contact your application administrator. Exception of type ‘CorkSolutions.Tabidoo.CoreLib.Exceptions.AttachmentDownloadException’ was thrown. (FileId:‘95162902-2506-4186-a367-1ac2f8f085fa’, ApplicationId:‘f813d698-4dee-4f6e-a62b-2ce582884752’, IsDefinitionImage:False) | GridFS file not found: revision -1 of filename “95162902-2506-4186-a367-1ac2f8f085fa”.

information says that the file was not found. Has the file been deleted or changed?

Regards,

No, the file is still available in the table A, but I can’t download it from table B

Any update on this?

I’ve noticed that when creating record in Table B the image is available for download. After saving a record and opening it again the thumbnail dissapears and I get this error when trying to download.

Please help me fix this because it worked ok before and it’s really important to me

Hi,

I tried it in the test app. I used the same script as you state for the two fields (File and Picture) and it works fine.

doo.model.picture.setValue(doo.model.user.value?.picture);
doo.model.file.setValue(doo.model.user.value?.file);

Could you please email me at support@tabidoo.cloud, with screenshots of Link to table (settings) and the sripting part with setValue added?

image

Thank you.

I have this cofigured the same way, but one thing is different.

if (doo.model.ver < 0) {
doo.model.picture.setValue(doo.model.user.value?.picture);
}

I want this picture to be added to record only when creating it and it should stay untouched. I don’t want to link this picture, I want to copy it, so when I change it in first table it won’t change in
second. It worked before, but now it’s not.