You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenCloud\ObjectStore\Resource\Container::uploadObjects() returns an array of Guzzle responses (in contrast to uploadObject() which returns a DataObject).
Is it possible to get the DataObject from a Guzzle response? I need to upload a batch of files, but then store each file's public URL.
The text was updated successfully, but these errors were encountered:
Unfortunately there is no way to do this directly with the SDK. However, the following snippet of code should get you what you need, assuming you had the line $responses = $container->uploadObjects($objects) in your code:
UPDATE: I have submitted a pull request (#546) to allow uploadObjects to return an array of DataObjects. Until that is reviewed and merged, please use the workaround described above.
Hi there,
OpenCloud\ObjectStore\Resource\Container::uploadObjects()
returns an array of Guzzle responses (in contrast touploadObject()
which returns aDataObject
).Is it possible to get the
DataObject
from a Guzzle response? I need to upload a batch of files, but then store each file's public URL.The text was updated successfully, but these errors were encountered: