WICG / file-system-access

Expose the file system on the user’s device, so Web apps can interoperate with the user’s native applications.
https://wicg.github.io/file-system-access/
Other
669 stars 66 forks source link

How to edit specific files like PDF #365

Closed julienGrd closed 2 years ago

julienGrd commented 2 years ago

Hello guys, i try to use your api to allow my users to edit some pdf (fill the pdf form with for example the chrome pdf viewer) and retrieve the modification to send back to server, but i wasn't able to make it working properly.

The main problem here is how we can edit the file.? Im able with this api to dowload the file locally and keep the filehandler to retrieve the updates, but i blocked on how i can edit the file ? like an option on the fileHandler to say "Open this file with default editor on the OS". this would be perfect. and with a callback when the file is closed would be even more perfect.

But for now to edit the file i have to manually open it on the eplorer. i can't ask my end user to do that there is too many risk they edit the wrong file.

Is this a subject you cover in your use cases ? Or you think about it ? because now its really limited to edit txt files and maybe some image, but all other file type are mainly not supported.

I target specifically chrome in my webapp so maybe there is something to do with the chrome pdf viewer ? (i don't know some options to make it work with this fileHandler)

thanks for your help

a-sully commented 2 years ago

This API exposes read/write file handles to websites, but what sites do with that handle is outside the scope of this API.

In other words, we can help you read a PDF file and then later overwrite it with a new file after changes are made, but the "allow a user to edit this PDF" functionality must be handled by the website.