Use a button to stamp/copy an image to another column

I am using createdalleimage() to create an image. Then I want to ‘stamp’ or copy the image into an image column to preserve it. When I try to modifyrows()it returns errors. Here is a short gif:

Screenshot 2023-10-20 at 11.41.19 AM

Based on the error you’re receiving, modifying the row with the image does not look possible since the action is too large for Coda to handle. Would be interested to see if any additional errors are displayed in the browser console when you take this action, though? :thinking:

Contact the pack maker. Most likely the image is returned as Base64-encoded Data URI. One is fine for the row but two overflow the ~70kb row size limit.

The pack maker should have uploaded the image to temporary blob storage and returned a URL to that uploaded image. Since that URL would expire in 15 minutes and the image would be gone, the pack maker should have implemented this as a sync table, which takes care of ‘downloading’ temporary uploads and persisting them to attachments.

As a temporary workaround you can try copying the image not to another column on the same table, but to a separate table (so that there’s another row that has 70kb unused), and link back through a lookup to this row.

1 Like

Here is the console error @Nicole_Macdonald :

Screen Shot 2023-10-23 at 2.47.31 PM

Hey @Paul_Danyliuk the Pack Maker is Coda! and @Spencer_Chang .

Thanks for the original idea. I tried to implement it here:

with this formula:

  ModifyRows([Stamp Dalle Fix Table].first(),[Stamp Dalle Fix Table].Image,thisRow.[Dalle fx]),
  ModifyRows(thisRow,thisRow.[Dalle Stamped],[Stamp Dalle Fix Table].Image.first())

But I get these errors:
Screen Shot 2023-10-23 at 2.54.03 PM
Screen Shot 2023-10-23 at 2.54.09 PM

This is with the Fix table’s column being Image type. Maybe this would work better by going between Image to ImageURL to Image or something?

Yep, the image is 525 KB and cannot be stored to a cell. The limit is ~87 KB per row. That’s what the error says.

And you won’t just get its URL because there is none. The image is apparently returned as data, otherwise it woudn’t be 500+ KB. If the content of the cell was a URL, then ModifyRows would just copy that URL.

There is a solution/workaround to this with a custom pack. I implemented it for a client once. If you’re interested in paying for it DM me.

Besides, I see the pack in question (OpenAI) has source code. Hence you’re welcome to copy it and adjust it yourself in the way I outlined above.

P.S. Looking through the code, there is actually a parameter to return the URL rather than data. The URL is still temporary though. To persist the picture you still need to use the workaround, or upload it somewhere (Drive, Dropbox etc) and reference from there.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.