You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remove the import of the upload function for runtimes that do not have a file system
add test's for each of the functionalities.
What's the cleanest way to tree shake the upload function? Since the upload function depends on fs an Deno.open respectively
opt-out: the upload function it's in the package by default, and in envs like workerds you would "import telegraph from grammy/posts/workerds" (or, /nofs)
opt-in: the base package would come for everyone the same, an additional upload function could be imported from "grammy/posts/upload", for example. This way the upload function could be it's own package.
Is there any other way around it?
Edit: I did a small gist using inputFile, for obvious reasons this is not ok, it's specially bad, not because it would first upload it to telegram and then fetch the getFile and the use that link for uploading it to telegraph, it is because the user would the photo, see it delete, and then receive the post).
I'm leaning towards distributing it with no upload function and having a separate package for the upload, like mentioned in the opt-in option. That would need a rework of the telegraph bindings package
The text was updated successfully, but these errors were encountered:
What's the cleanest way to tree shake the upload function? Since the upload function depends on fs an Deno.open respectively
Is there any other way around it?
Edit: I did a small gist using inputFile, for obvious reasons this is not ok, it's specially bad, not because it would first upload it to telegram and then fetch the getFile and the use that link for uploading it to telegraph, it is because the user would the photo, see it delete, and then receive the post).
I'm leaning towards distributing it with no upload function and having a separate package for the upload, like mentioned in the opt-in option. That would need a rework of the telegraph bindings package
The text was updated successfully, but these errors were encountered: