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

web-friendly /uploadbyurl endpoint #12

Closed
sglkc opened this issue Jun 28, 2024 · 5 comments · Fixed by #16
Closed

web-friendly /uploadbyurl endpoint #12

sglkc opened this issue Jun 28, 2024 · 5 comments · Fixed by #16

Comments

@sglkc
Copy link
Contributor

sglkc commented Jun 28, 2024

I want to make a web-compatible function that doesn't use any image processing (sharp) and node exclusive package (undici)

Usage is the same like current implementation, but instead it uses the url parameter
https://lens.google.com/uploadbyurl?url=https%3A%2F%2Flune.dimden.dev%2F7949f833fa42.png

If you wouldn't implement it here then I'd happily make a separate package, if it's good with you

@dimdenGD
Copy link
Owner

There's already LensCore file that doesn't have that, read documentation

@sglkc
Copy link
Contributor Author

sglkc commented Jun 28, 2024

my use case is for faster batch processing by directly using image urls, letting google handle the rest so the package doesn't have to fetch images, analyze its dimensions, getting its mime type, and uploading it to google

@dimdenGD
Copy link
Owner

Oh, currently I don't have plans to add that but it'd be a good addition as a new function (or to replace current scanByURL one). So if you'll make a PR I'll merge it

@sglkc
Copy link
Contributor Author

sglkc commented Jun 29, 2024

since dimensions aren't known and image isn't fetched, how would one handle imageDimensions parameter for BoundingBox, Segment, LensCore.parseResult, and LensCore.fetch?
though it's possible to default to 0 and it'll only make BoundingBox pixelCoords values 0

@dimdenGD
Copy link
Owner

I assume you should just make it so pixelCoords doesn't exist when using scanbyurl and document that

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

Successfully merging a pull request may close this issue.

2 participants