Check if a PublishedFile upload has completed?

Is there a way to check the status of a PublishedFile upload?

Hi Ricardo. Your question is a little confusing since AFAIK standard PublishedFile creation doesn’t do any file upload, it only registers a new entry for a PublishedFile entity. If on the other hand you’re referring to the Version submission (which some publishes trigger via hooks) then you can usually check the status of the subsequent transcode step via the “uploaded movie transcoding status” field on the version entity.

Sorry for the confusion.

Basically is there anyway to check from ShotGrid/the database if a sg.upload to a field is finished.

Particularly on the PublishedFile Path field.
(If instead of linking to the filesystem you upload a file to it)

Hi Ricardo, I believe the sg.upload method itself is blocking, so it should be finished when it returns. But from the sound of it you need some external mechanism to check on the status of the upload, correct? Looks like the upload doesn’t update the ‘path’ field with a link to the newly uploaded file entity until the transfer is completed, so you can probably poll that field itself to see if it contains a link to a newly created file entity.

cheers

1 Like

Thanks,

think I found a different way to accomplish what I needed, possibly wasn’t thinking straight!

Also… Van Den Bosch… Dutch background? :wink:

Close, Belgian. What did your solution end up being Ricardo?

1 Like

I just set the status of the PublishedFile to something my event handler won’t act on until the upload completes, then the status is turned into something it will act on.

Not sure why I didn’t think of this before…

1 Like