Skip to content
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

Bug: File Userfields: Uploading big files (= when the upload takes longer than a couple of seconds) doesn't work #2458

Open
PedroCPereiraDev opened this issue Feb 5, 2024 · 5 comments
Labels
Milestone

Comments

@PedroCPereiraDev
Copy link

PedroCPereiraDev commented Feb 5, 2024

Hello,

I created a UserField called Software for my Equipments, being this field a FILE type.
My intent is to save ZIP containing firmwares or other related small pieces of software.

Upon uploading the file successfuly, it shows as saved but cannot be retrieved or downloaded.

Attached I show prints of how it appears.

My expectation was that obviouly would not be displayed but that pressing the download button would work.

Other related bug is that I tried with other file types, and other file types work (I tried with a STL file) but then another strange interaction happaned. If for example you upload an STL file, once you go to the Equipments list, and click the TAB of the UserField File you created it automaticly downloads the STL file. I believe it should only download if you click the download button.
Attached I also send a photo, except for the auto download the UI when uploading an STL seems good to me.

I tried in a HASS addon instance, a UNRAID docker instance, and both directly via IP or via a NGinx Proxy to rule out network.
I tried also the pre-realease demo and the same behauvior happened.

I state this BUG as related to ZIP files, but I suspect it

what_happens_when_downloading_using_the_button:
what_happens_when_downloading_using_the_buton

how_it_appear_in_the_list:
how_it_appear_in_the_list

how_it_appears_in_edit_mode_after_saving:
how_it_appears_in_edit_mode_after_saving

what_shows_when_the_file_is_an_STL:
what_shows_when_the_file_is_an_STL

@PedroCPereiraDev

This comment was marked as resolved.

@PedroCPereiraDev

This comment was marked as resolved.

@berrnd berrnd changed the title Bug: Userfields as FILE do not work with ZIP files and with other files it auto downloads Bug: File Userfields: Uploading big files (= when the upload takes longer than a couple of seconds) doesn't work Feb 5, 2024
@berrnd
Copy link
Member

berrnd commented Feb 5, 2024

Unrelated to the file size (your web server or reverse proxy could be more the problem related to that) or type, just a timing issue related to how the frontend handles File-Userfield uploads (the API works already fine).

Bigger file = it takes (normally) longer than a couple of seconds, that's the reproducible problem - but also reproducible with small files and a slow af connection, try it out. It's not a display issue, the file isn't uploaded at all (or not fully, at least not saved on disk - check your data/storage/userfiles folder).

Also unrelated to Equipment, happens for any File-Userfield also on other entities.

Providing a real practical example on a persistent demo instance would be a cool thing (as mentioned on the issue template), looking behind screenshots is always hard.

@berrnd berrnd added this to the vNEXT milestone Feb 5, 2024
@PedroCPereiraDev

This comment was marked as resolved.

@berrnd

This comment was marked as resolved.

@berrnd berrnd modified the milestones: v4.1.0, vNEXT Feb 8, 2024
@berrnd berrnd modified the milestones: v4.2.0, vNEXT Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants