blob will not save

I'm attempting to attach a Blob to a document.:
File tmpFile = Framework.createTempFile("...", ".csv"); ... write to the file Blob blob = Blobs.createBlob(tmpFile); myDocument.setPropertyValue("file:content", (Serializable) blob);

What's really odd is that we use this pattern all over the place. But in this case - it refuses to work. I can see the temp file in the tmp directory, and the GUI shows the matching temp file name on the web page. But when I download - the content never changes. And when I look in the “content” table in the Postgres database, the data value never changes - it's stuck at the same data folder name. Is there something obvious here I'm missing? Thanks.

0 votes

0 answers

1511 views

ANSWER

After setPropertyValue are you saving the document and then the session?
12/21/2017

Yes - I wound up deleting the directory under the tmp data folder that held that file - "YY" in …/nxserver/data/binaries/data/XX/YY and after that it worked. (This was a test environment.) Thanks.
12/22/2017