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
[Blueprints] Fallback to URL-based file name when fetching remote ZIP files (#2470)
## Motivation for the change, related issues
Fixes#2464.
Sometime, the URL resource fetches the remote file and yields an empty
filename, which causes troubles the `installTheme` step (it can't infer
the final plugin filename). This PR ensures the downloaded `File` object
always has a filename.
## Implementation details
Adds two filename fallbacks:
1. Content-Disposition headers
2. The fetched URL (urlencoded)
## Testing Instructions (or ideally a Blueprint)
Confirm this Blueprint works in your local browser:
```json
{
"steps": [
{
"step": "installPlugin",
"pluginData": {
"resource": "url",
"url": "https://github-proxy.com/proxy/?repo=woocommerce/woocommerce&release=latest&asset=woocommerce.zip"
}
},
{
"step": "installPlugin",
"pluginData": {
"resource": "url",
"url": "https://github-proxy.com/proxy/?repo=woocommerce/wc-smooth-generator&release=latest&asset=wc-smooth-generator.zip"
}
}
]
}
```
cc @bacoords
0 commit comments