X Tutup
Skip to content

Implement local URL upload (WIP)#216

Open
lapo-luchini wants to merge 2 commits intomasterfrom
local-upload
Open

Implement local URL upload (WIP)#216
lapo-luchini wants to merge 2 commits intomasterfrom
local-upload

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

X Tutup