-
Notifications
You must be signed in to change notification settings - Fork 2.5k
The stream was disposed before its real end #17859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Please elaborate what happens before "Go to CreateFileFromStreamAsync of DefaultMediaFileStore". That's in the code; what do you do as a user? |
It is a little complex to explain that.
which is on PR now |
This was referenced May 1, 2025
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
creatingStream was disposed , which made the event hander could not manipulate the stream.
Orchard Core version
latest main
To Reproduce
The stream was not opened for writing.
or disposed
Expected behavior
Logs and screenshots
2025-04-27 16:06:36.0753|Default|00-2f2c2e1e33d2f3a42eac04632ee95bfd-38307f23cf03942c-00||OrchardCore.Media.Controllers.AdminController|ERROR|An error occurred while uploading a media OrchardCore.FileStorage.FileStoreException: Cannot create file 'zg2/Andy-UX.docx'.
---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.String'.
at Microsoft.AspNetCore.Http.ReferenceReadStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
at System.IO.Stream.g__Core|27_0(Stream source, Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
at OrchardCore.FileStorage.FileSystem.FileSystemStore.CreateFileFromStreamAsync(String path, Stream inputStream, Boolean overwrite)
--- End of inner exception stack trace ---
at OrchardCore.FileStorage.FileSystem.FileSystemStore.CreateFileFromStreamAsync(String path, Stream inputStream, Boolean overwrite)
at OrchardCore.Media.Core.DefaultMediaFileStore.CreateFileFromStreamAsync(String path, Stream inputStream, Boolean overwrite)
at OrchardCore.Media.Controllers.AdminController.<>c__DisplayClass19_0.<b__1>d.MoveNext() at OrchardCore.FileStorage.FileSystem.FileSystemStore.CreateFileFromStreamAsync(String path, Stream inputStream, Boolean overwrite)
at OrchardCore.Media.Core.DefaultMediaFileStore.CreateFileFromStreamAsync(String path, Stream inputStream, Boolean overwrite)
at OrchardCore.Media.Controllers.AdminController.<>c__DisplayClass19_0.<b__1>d.MoveNext()
The text was updated successfully, but these errors were encountered: