Since the SDK library is deprecated, is there a way to upload files into the Asset programmatically with PHP using curl or with Postman, right now I can just create empty assets...
1 Answers
If you can, switch to use Typescript and Node.js. Better support, and an official SDK is available for most all Azure services.
https://github.com/Azure-Samples/media-services-v3-node-tutorials
A nice way to handle that from PHP is to just create a middle layer API using Node.js, or Azure Functions with Javascript to import the Media Services Javascript SDK and make the backend calls. You can then just call your middle tier API from your PHP app.
Otherwise, the other solution is to just continue to mess with Postman and the built in code generation in there.
Also, note that there is not an Upload feature in the AMS SDK. All it will do is allow you to create an empty Asset - which is just a pointer to a container in your storage account. On the Asset there is a "container" property. You can request a SAS URL to use to upload to that container. But the actual uploading is handled by the blob storage SDK to put blobs into the container.
See this sample in Node.js https://github.com/Azure-Samples/media-services-v3-node-tutorials/blob/0027171982c8475e080beac83b0e2b33cbe7d943/Streaming/StreamFilesSample/index.ts#L243