Closed rufuspollock closed 10 years ago
@simong what do you reckon about this one? A nice test here is dragging an image from webshot to e.g. a github issue ....
The first issue can be resolved by sending a Content-Disposition:attachment; filename="bettername.png"
header (or simply using res.download).
As for the second part of your question, I think GitHub tests a regex against the dropped URL. Since our URLs don't end in .png, they might get ignored.
I've added a commit which implements the first part of my previous comment
@simong i notice now that the file seems to automatically download - i think we still want a file to be shown "in the page" - but have the option to download it (oir drag it somewhere)
Also, I note that even from main page where image is embedded I still can't drag and drop to e.g. a github issue - i wonder if we do actually have to set the file name to be a ".png" - i.e. we need to have .png on the end of the file name url in some way ...
@simong see comment above - any thoughts here on best approach?
At the moment if I choose to download I don't get a nice name.
Also if I try to drag and drop into e.g. a github issue it tells me filetype is not supported (my guess is because no .png extension ...)