Closed PatrickBig closed 1 year ago
Hello,
the path is null because, OnImageUploadEnded
occurs before the filePath = response;
line since the image was already uploaded.
Now, I see this as a valid use case. Having an api return an url and only then can you set the file path.
@stsrki I still do not know what changes we would need to do, but do you agree?
Also found another issue, once I commented out OnImageUploadedEnded
, it throws an Exception
. This should not happen.
And even removing the OnImageUploadedEnded
callback from the Markdown causes the same Exception
I still do not know what changes we would need to do, but do you agree?
I'm not 100% sure but it seems that we don't check for null on the JS side. That, or easymde is broken.
Hello @stsrki it's two different things. 1— Allow to set file upload url after upload was completed. I.e receive url from api upload call. 2— 'null' exception
@stsrki agree with 1? For number 2 I believe we can handle it ourselves.
Well, try to do both. But I', not sure if 1 will be possible. I remember some limitation was there, not sure.
Well, try to do both. But I', not sure if 1 will be possible. I remember some limitation was there, not sure.
Ok, will take a look but it's a pretty damn valid use case haha. I remember that actually we hit this road block when implementing on support forum, but since we could "calculate" the path before hand, there was no issue.
Describe the bug I'm attempting to update the
File.UploadUrl
property in theBlazorise.Markdown.Markdown
component so it can render the image in the editor.In my environment I cannot get the URL from
ImageUploadChanged
toImageUploadEnded
to set the Url.To Reproduce
Environment:
Steps to reproduce the behavior:
Component
Code behind file
Expected behavior I would expect one of two things:
IFileEntry
would get it's update from being set after the upload completes when using theAddNewsArticleAttachmentAsync
method. It's not. It's always null inOnImageUploadEnded
filePath
would have the update. It's always null inOnImageUploadEnded
Additional context I have confirmed that the upload is indeed happening, I can see the files in my blob storage. I can also see my client is returning a valid URL to those resources as well.