-
Notifications
You must be signed in to change notification settings - Fork 13
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Specify your own filename for a screenshot #3
Comments
Almost certainly going to clash, might be easier to somehow specify you want it cached and then get given a URL that is a base 62 encoded int of some description, or a UUID or something? |
Hmm, but isn't this just like bit.ly - sure there can be clashes but that's life ... |
I think I'd rather have a URL that had a UUID in it than use it on a site and have someone 'accidentally' overwrite it with a picture of kittens. |
@rossjones you wouldn't be able to overwrite - like bit.ly this would be write once ... @simong what do you reckon? how easy is this to implement do you think? |
It could work on a first-come first-served basis, similar to dns names? We'd need to work out how to store the actual files and stick a small database behind the app. I don't think it'll be terribly hard. We just need to figure out a way to easily do this on both okfn as dev. I'll try to come up with a prototype in the next week(s). |
@simong agree re first-come, first-served (let's do the simplest thing possible). I suggest we use s3 as the backend for the present (no need for a proper database) plus we need to store images ... |
Example: The file would be accessible at which would actually be stored at:
(The hashing is in place so we don't end up with thousands of files in a single folder) If we would ever be worried about taking up too much space we could make use of S3 their object expiration [1]. WDYT? [1] http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectExpiration.html |
@simong sorry to miss this at the time. Proposal looks really good. If you need s3 space we can get s3 bucket setup for you. Small suggestions:
Also implementation detail: suggest GET webshot.okfnlabs.org/f/openspending.jpg redirect to s3 bucket rather than proxying to save on b/w and hassle Would be awesome to get this implemented! |
@simong I was just using webshot again (I use it a lot!) and really missed this feature. I think this would be super useful to have. Following my last comment my only thoughts were:
|
@simong any time to work further on this - I use this service all the time and I would love to have this ability to save feature. I'm also wondering if we really care about namespace issues about allowing users to login with e.g. github - it is so easy to implement (but that may be overkill!) |
Hi all, I finally had some time available to move this ahead. Currently my
Some questions:
|
@simong some HTTP nitpicking: if you let your client choose the name, you should use PUT. If your server can choose the name, you should use POST. |
@simong first this is fantastic - great work :-) Thoughts
@pietercolpaert personally I'm not too zealous on PUT vs POST - i know that if we are being nicely RESTful we would do it but happy not to be perfect ;-) |
It feels like you'd lose some of the value of providing a custom name if we're prefixing timestamps/random strings? Each url would look like |
@simong i think people will usually need to copy and paste anyway but what's nice is you can just see the url and know what the thing is which is really nice. I'm thinking looking at it that the date one is probably the nicer one. |
@simong any update here? /cc @danfowler something for the next newsletter and generally to advertise! |
@simong @rgrp Reserving a place for this in the upcoming newsletter 😄 |
@simong do you need anything from me? |
@simong any update here - this would be so awesome. Couple of final thoughts:
|
Allow users to specify a short name to save their screenshot at (a bit like bit.ly but for screenshots). E.g. you could do ?filename=... and then you could get that screenshot forever at:
webshot-service/f/{filename}.png
The text was updated successfully, but these errors were encountered: