SenseNet / sn-client

Monorepo for sensenet client packages 🐱‍💻
https://sensenet.com
GNU General Public License v2.0
25 stars 37 forks source link

[BUG]reupload file says 500 #900

Closed VargaJoe closed 3 years ago

VargaJoe commented 4 years ago

🐜 Bug Report

Upload a file already in the repository throws error

📦 Package / Application

admin-ui

📃 Version

latest

🐜 Describe the bug

Tried to upload a file to overwrite previous, but upload fails.

👉 Steps To Reproduce

  1. Go to a folder
  2. Click on upload
  3. Browse a file already in the folder
  4. try to upload

😯 Current behavior

Upload failed. (one of the upload request says on the network tab: Cannot serve a binary field during uploading any stream.)

🤔 Expected behavior

upload successfully and the file is overwritten

🌍 Your environment (for apps / examples)

tusmester commented 4 years ago

I think this is not the case anymore. Current behavior: a new file is created every time I upload the same document. Is this correct? The Upload action is sent with overwrite: false. @herflis

herflis commented 4 years ago

@VargaJoe I cannot reproduce this issue either, because of the overwrite: false mentioned by @tusmester. Maybe it is an issue with the file itself (may not be fully uploaded or it became corrupt, etc) Can you please share the file that caused this issue?

VargaJoe commented 4 years ago

I've tested multiple times:

Can be reproduce with netcore test.

herflis commented 4 years ago

I can reproduce this issue as well.

steps:

  1. login to netcore.test.sensenet.com at admin.test.sensenet.com
  2. Go to Sample workspace's doclib, upload a file
  3. Upload the same same file again

image

kavics commented 3 years ago

The blob is not finalized after the last byte is uploaded. Therefore the currently uploaded blob stays in the "staged" state that causes this error: Cannot serve a binary field during uploading any stream.. There is explicit action(s) that removes the uploaded blob from this state.