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

Implement local URL upload (WIP) #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lapo-luchini
Copy link
Contributor

Work in progress: this seems to work already, but it forces upload from browser and I'm not sure we want that in every case.
When it works, delegating the server to download can often be faster (I'm thinking people on ADSL with good download but bad upload).
Maybe we should first try "upload from URL" and only try local upload (automatically) as a second try?
What do you suggest?
Once completed this would close #66.

@winkidney
Copy link
Member

Great feature, sometimes we should fetch the preview in case our server has no permission to get the image.
I think first try "upload from URL" and only try local upload (automatically) as a second try is a better choice.
After our server failed to fetch the image, we could upload it via browser-file.

@winkidney
Copy link
Member

Any further changes?
I prefer to try downloading image on server before we upload from local file, haha.
It seems that current implementation is "upload local file directly".

@lapo-luchini
Copy link
Contributor Author

Yeah, I have to work on it still. Probably will have a bit of time today/tomorrow.

@winkidney
Copy link
Member

Expecting your great work!
I've add new checks on front-end building workflow, don't forget to rebase to master to apply the change : )

Signed-off-by: Lapo Luchini <lapo@lapo.it>
@lapo-luchini
Copy link
Contributor Author

I tried updating this code again, but there are CORS problems too unfortunately:

The resource at “https://instagram.fmxp6-1.fna.fbcdn.net/…” was blocked due to its Cross-Origin-Resource-Policy header (or lack thereof). See https://developer.mozilla.org/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)#

These problems can be avoided in the browser plugin, but this needs a major change in cooperation between the bookmarklet (which alone cannot read images from cache) and the browser extension.

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

Successfully merging this pull request may close these issues.

Bookmarklet should allow uploading file
2 participants