Open rijarobinson opened 5 years ago
Handling as part of #75
Reopening as it's not being handled in #75.
We could actually integrate with their API with the webhook endpoint as well to confirm storage of the file: https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/copyFile. The benefit here would be that users could configure their uploadcare bucket to not autostore, which gives 24 hours to confirm the file, otherwise it's deleted. This would ensure that the stored files are only actual orders (assuming the customer orders within 24 hours, might be worth adding a 24 hour expire parameter on these products?)
Could make that a configuration option for the plugin too - set whether to auto-store or confirm, and then only perform the API request (and potentially the expires parameter) if that's set to confirm storage.
See Custom File Upload at https://www.foxy-shop.com/documentation/product-variations/ to see the current workaround and integrate this natively.