vc-platform
vc-platform copied to clipboard
Fix asset uploading to root of assets
Version info:
- Platform version: 2.13.23
Expected behavior
Asset should be successfully uploaded on root of assets (i.e. Assets blade opened by menu)
Actual behavior
It fails.
Research
When you upload file via FileUploader in nesting folder, for example - /temp, then folderUrl will look like "http://localhost/admin/assets/temp" or "https://myplatformdemo.azurestorage/temp", i.e. will always have url. If you will upload file to root of assets, folderUrl will be null. While FileSystemBlobProvider correctly working with this case and will return correct folder path in OpenWrite method, AzureBlobProvider will mistakenly return file name as folder path and null as file name (see GetContainerNameFromUrl, GetFilePathFromUrl).
Looks like already fixed in one of previous releases
Still fails. Could be the reason of failing to upload new theme. Version info:
- Platform version: 2.13.43