Doc/Change request: uploadHubFile() - names cannot have spaces

,

I do not consider this urgent, and documenting it would be just as good a solution as changing the code.

The uploadHubFile() method is not really documented at File Manager API | Hubitat Documentation nor at Common Methods | Hubitat Documentation . From those limited docs, it was not clear to me what limitations a file name has. Specifically, I got bit by user-input names sometimes failing without an error. Because they had spaces.

This is well documented at File Manager | Hubitat Documentation, but that is not linked from Common Methods | Hubitat Documentation and I didn't find File Manager API | Hubitat Documentation until writing this issue.

Please consider adding a link to the File Manager | Hubitat Documentation documentation as a pointer to file name limitations at the other two locations.

I would also request that uploadHubFile() be changed from a void to a boolean, so that we can at least find out that it failed. Or perhaps a String, with it removing illegal characters and returning the effective file name.

Thanks

1 Like

:thinking: It's actually linked to twice:

image

That being said, perhaps a note on the same restrictions and some additional explanation could be added. So...now is, and it's linked three times. :slight_smile:

2 Likes

Thank you. I'll take it. :wink:
(Would love a return value from the method for when uploads fail. But consider that a gentle request. )

1 Like