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

Support file upload from the web UI #1815

Closed
jyasskin opened this issue Feb 28, 2024 · 5 comments · Fixed by #1836
Closed

Support file upload from the web UI #1815

jyasskin opened this issue Feb 28, 2024 · 5 comments · Fixed by #1836
Assignees

Comments

@jyasskin
Copy link
Member

I'd like to iterate on pubrules errors in a local file, but https://www.w3.org/pubrules/ expects me to have a public URL available. I can use the JS or REST API, but it'd be more convenient if there were an <input type=file> control on that page.

@jyasskin
Copy link
Member Author

REST turns out to be less helpful than I expected: the endpoints are all GET, so there's no obvious way to send the file parameter, and no examples in https://github.com/w3c/specberus/blob/main/README.md#5-rest-api.

The JS API kinda works, but I had to figure out that I needed to import the right profile instead of just writing "WD", and the EventEmitter interface for getting results is awkward.

@deniak
Copy link
Member

deniak commented Mar 1, 2024

@jyasskin thanks for the suggestion. We actually got similar requests in the past and one of the reasons we didn't support this is that pubrules relies on external services like the markup validator.
That said, we can probably come up with a different approach to support file uploads but I will need to review the different use cases. I expect I'll be able to work on this in 2 or 3 weeks.

@wareid
Copy link

wareid commented May 22, 2024

I am currently struggling with this exact problem at the moment and I would like to +1 the need for file upload as an input option. In my particular use case, I'm not the most proficient with REST or JS APIs so I am limited to the web interface.

I'm trying to prepare a file for publication, I don't really want to have to throw this temp file into my GH repo just to test this, it would be a lot more helpful to be able to upload it to Pubrules directly.

@deniak deniak self-assigned this May 29, 2024
@deniak
Copy link
Member

deniak commented Jun 5, 2024

@jyasskin @wareid, sorry it took so long to implement but it is now possible to upload an HTML file to pubrules.
It can be done from the web interface or from the API.

@wareid
Copy link

wareid commented Jun 5, 2024

@deniak This is amazing! Thank you so much for taking care of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants