-
Notifications
You must be signed in to change notification settings - Fork 142
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
Adding firebase storage capability (w/ multiple files) #69
Adding firebase storage capability (w/ multiple files) #69
Conversation
@mbleigh Hi, would like to know any updates on this :) |
Plan to take a closer look next week, thanks On Fri, Aug 19, 2016, 9:02 AM Toni-Jan Keith Monserrat <
|
We're trying to use this and we can upload files fine. We're having trouble understanding how to access files from firebase storage however. One way we imagine this working would be something like: <firebase-storage
id="fs"
app-name="myapp"
path="/path/to/image.png"
files="[[files]]"
on-error="catchError">
</firebase-storage>
<img src="[[files]]" alt="my file"> I see that there's a function for getDownloadUrl() but not sure how this should be used. Or is the intended use to getDownloadUrl() on upload and store that in the database instead? Could you please clarify how this should be used for downloading ? |
Hi Saad, Unfortunately, the current implementation does not behave the same firebase On Sat, 17 Sep 2016 23:37 Saad Elbeleidy, [email protected] wrote:
|
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
@googlebot The added parts are just from the messaging branch from the polymerfire. |
@mbleigh hi. would like to know if i should rewrite this or is this still a part of the plan of polymerfire |
demo/firebase-messaging.html
Outdated
p { | ||
margin: 32px 32px 0; | ||
} | ||
>>>>>>> upstream/master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the latest commit brought in some merge conflicts that need to be resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch there. thanks
@tjmonsi, can you fix the commits? I would like to get this to update it with more features. |
Will get back on this this tuesday. Just had a surgery. Sorry :(
…On Sun, 12 Feb 2017 18:33 Josef Jezek, ***@***.***> wrote:
@mbleigh <https://github.com/mbleigh> @cdata <https://github.com/cdata>
@tjmonsi <https://github.com/tjmonsi> Please resolve this PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AChe1peKeZPzmCjs_1PBqlHmmp2G3LHYks5rbt_hgaJpZM4JIHKx>
.
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@jorgecasar It is said that the branch has no conflicts with the base branch, so I am just waiting for them to merge. I don't know what @mbleigh 's plans on having a firebase-storage but then again... I am happy to help now that I am back (after my surgery). If there's anything I need to change, please help me and point it out so I can fix it easily. Thanks 😄 |
@tjmonsi there are still some conflicts in the PR, have a quick look at the changed files, seems there went something wrong resolving merge conflicts I hope that PR makes it into mainline after all 👍 |
Hmmm... what I'm going to do is to check if I can still do a rebase. If not, I'll just open another PR and close this one. Thanks @locomuco |
@locomuco how about now? It's still saying that this branch has no conflicts with the base branch. I updated the dependencies though |
demo/firebase-messaging.html
Outdated
@@ -45,10 +45,13 @@ | |||
main { | |||
padding: 32px; | |||
} | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are still wrongly resolved conflicts
@tjmonsi there are 2 thins to solve:
|
I guess I'll just have to create another PR then. I think the one i did before made the conflict |
Signed-off-by: Toni-Jan Keith Monserrat <[email protected]>
CLAs look good, thanks! |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@FluorescentHallucinogen I think you need to sign the CLA now for this to work :) |
@FluorescentHallucinogen what do you mean? |
@googlebot All is ok. |
Run |
bower.json
Outdated
@@ -24,8 +24,11 @@ | |||
}, | |||
"devDependencies": { | |||
"iron-component-page": "PolymerElements/iron-component-page#1 - 2", | |||
"note-app-elements": "polymerlabs/note-app-elements#1 - 2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove "note-app-elements" deps as demo was removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing
bower.json
Outdated
@@ -36,8 +39,11 @@ | |||
}, | |||
"devDependencies": { | |||
"iron-component-page": "PolymerElements/iron-component-page#^1.0", | |||
"note-app-elements": "polymerlabs/note-app-elements", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove it too.
firebase-storage-multiupload.html
Outdated
* There are two ways to do this. You can encapsulate `firebase-storage-upload-task` in another | ||
* element to have a local scope of the upload task's state: | ||
* ``` | ||
* //file-uploader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove it, because looks like it breaks the markup.
firebase-storage-multiupload.html
Outdated
* </template> | ||
* | ||
* | ||
* // file-task |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove it too.
|
||
|
||
|
||
path from snapshot: {{item.snapshot.ref.fullPath}} <br/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about changing two-way data flow to one-way (double curly brackets — {{ }} to double square brackets — [[ ]]) around the all code where it is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll do that.
Signed-off-by: Toni-Jan Keith Monserrat <[email protected]>
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@FluorescentHallucinogen I think CLA is not yet ok. Can you try again? |
@googlebot I signed it! |
@tjmonsi Looks like a @googlebot bug. I signed Google Individual CLA Mar 12, 2016 06:22 PST. The ID of my CLA is 108694818465100465718. What should I do? |
Should I try squashing the commit? guys? |
@mbleigh PTAL. |
@FluorescentHallucinogen can you try saying you confirm to submit to @googlebot ? It asks that "We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request." |
I think the CLA is fine -- it's in a "terminal state" but it says I can merge on my discretion. I'm going to try to take another look through the code ASAP (probably not until next week) to see if we've got everything we need. |
@mbleigh thanks. :) |
@mbleigh I am waiting for |
@tjmonsi What about the problem with |
… On Wed, 31 May 2017 19:38 Alexey Rodionov, ***@***.***> wrote:
@tjmonsi <https://github.com/tjmonsi> What about the problem with toString
method that I reported earlier? Why toString
<https://github.com/firebase/polymerfire/pull/69/files#diff-275a8c1aff9eeaf594afd11a42e9eedeR190>
method is not listed in "Methods" section on the API Reference page
<https://www.webcomponents.org/preview/tjmonsi/polymerfire/58462a6a9f52b06072c1ee684adfe2bc2b07e793/elements/firebase-storage-ref#methods>
?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AChe1gmJNKGLN0dAEHQqf96VbAFY7yqhks5r_VEjgaJpZM4JIHKx>
.
|
@tjmonsi My question was "Why |
I haven't updated the Readme. Sorry about that
…On Wed, 31 May 2017 21:30 Alexey Rodionov, ***@***.***> wrote:
@tjmonsi <https://github.com/tjmonsi>
[image: screenshot]
<https://cloud.githubusercontent.com/assets/7892779/26634169/6e9a9d5c-461e-11e7-9c80-34212fde4fda.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AChe1ijVQUudaQT2RS07EnNF81iA9T_7ks5r_WuGgaJpZM4JIHKx>
.
|
Whoops! I just accidentally pushed this sucker to |
@tjmonsi can you please open a new pull request from the same branch? I've hard reset |
Will do
…On Thu, Jun 1, 2017 at 8:22 AM Michael Bleigh ***@***.***> wrote:
@tjmonsi <https://github.com/tjmonsi> can you please open a new pull
request from the same branch? I've hard reset master back to where it was
before.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AChe1gP4VbpzVDfvAUx6ESQ-ZRqSNtKJks5r_gQ8gaJpZM4JIHKx>
.
|
Please, im a noob, so, you pro guys... Can you make an EASY example of an image upload process? Including html, scripts in polymer and the API structure? Can this be used with polymer 2? Can i use the firebase/polymerfire api or should i use the tjmonsi fork??? |
@eeerrrttty have a look here at this PR, the PR was moved |
Following the patterns from
<firebase-document>
, I would like to ask for review for that addition of two components:Polymer.FirebaseStorageBehavior
and<firebase-storage>
firebase-storage allows the uploading of a single or multiple files from a
File
object or anArray
ofFile
objects (FileList
) fed to thefile
attribute. You can then call the.upload()
method to upload the files manually or just addauto-upload
attribute to automatically upload the files.All files and their statuses are returned via the
uploaded-files
property, where each element inside will be updated via events inside.Other methods:
destroy()
to delete the file / folder in the path.resume(i)
,pause(i)
,cancel(i)
: the methods found in the upload tasks. Thei
parameter is for accessing the file element in the array returned fromuploaded-files
Example usage as follows:
You can play with the demo here: https://practice-play-for-polymer-tjmonsi1.c9users.io/
This is an offshoot of the PR #30 and hopefully a fix for #10.
Some bugs:
cancel
,resume
, andpause
sometimes doesn't respond even when wrapped around a promise. Will try to figure out why.Would like to get some feedback