-
Notifications
You must be signed in to change notification settings - Fork 662
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 Chunk File Upload Support to the library #977
base: development
Are you sure you want to change the base?
Conversation
Changes to implement chunk file upload, more information on the README
Codecov Report
@@ Coverage Diff @@
## development #977 +/- ##
===============================================
- Coverage 34.72% 32.46% -2.27%
===============================================
Files 10 11 +1
Lines 550 807 +257
Branches 80 106 +26
===============================================
+ Hits 191 262 +71
- Misses 341 527 +186
Partials 18 18
Continue to review full report at Codecov.
|
How can I use this to chunk file upload support to Azure storage, Is there any documentation available? |
@mbaljeetsingh Hi man as you requested i added a little bit more examples on the ReadMe of my Branch |
Thanks I'll take a look. I'm actually getting sas token based on the logged in user credentials. So, it seems secure 😉 |
@PauloPeres Can you push your code to separate npm package? Otherwise I think I have to copy paste the updated files to ng2-file-upload node_modules folder. Is there's a better solution? |
@mbaljeetsingh Hi Man.... |
Ok, I'll give it a try like this |
@PauloPeres Got the import working for your code.
As I'm using SAS token, I'm not sure how should I set the item URL in the case of adding chunk support.
As I'm not updating URL in the So, I'm stuck. Can you suggest, how should I go about If I need to use SAS token? |
@mbaljeetsingh use the onBeforeUploadItem and set item.url as the url you need for that specif item to be posting the chunks |
@PauloPeres Updated the URL in onBeforeUploadItem, But when the upload start it is doing post request on the URL, so getting the error (The resource doesn't support specified Http Verb.) Shouldn't it send the put request? |
@PauloPeres I updated the uploader object with method and headers,
Now it seems to start uploading, but I'm not getting any response back in
|
So it's getting error on the uploadcheck the uploader.onErrorItem callback to see if the first chunk is going or what kind of error you are getting from it. i don't know who you should send data to the blob storage letting it know what chunk number you are sending, |
@PauloPeres Can you share how you structured your API, I may ask the developer to make modifications accordingly? I'm getting the following response on both
The problem I think is, when we use SAS token, It is expecting a put request to the url similar to the following,
We also need to pass the header,
|
@mbaljeetsingh Hello Again : ) You should be able to copy the same logic to TypeScript Theres useful information on the Node Module from Microsoft |
@PauloPeres Any chance you can publish this to your own npm project? It appears the devs behind ng2-file-upload haven't made any changes or been active on this project in a long time. I would really like to use the chunk file upload if possible. |
definitely would like to see this as an npm project |
Hi @ph3n0m666 ad @bvercelli99 Sorry for taking to long. On the path of doing so, i updated the version of the Package to use Angular 6, and Instead of using the links, use a Service, this way we can have more control over the functions of the upload. Will be trying to send that NPM Package ASAP! It's a little bit complicated because of the Day-to-Day Stuff :D |
@PauloPeres Just came across this on my search for an easier solution to uploading to Azure Blob Storage, I'm using the preview to do it with Azure Active Directory tokens which should be just great to use on the client side. Not being able to find this on npm made me a bit weary of using it, is this still something that's going on or has the main ng2-file-upload picked up on the chunk feature? |
Was this ever moved to a separate repo and published on npm? |
@MgSam never done it... Let me update to Angular 7 and will deploy it to NPM |
Looks promising. Tried to npm install it from git repo and build it but there were some issues, so I guess ones best bet is to copy changes manually or wait for the official package to be released. Thanks @PauloPeres ! |
Hi @PauloPeres, Is there any possibility to publish this feature to ng2-file-upload? This really helpful and match exactly what I'm looking for. |
@PauloPeres is there any way to abort a chunk upload process? Because item.cancel() not workinkg in chunk model. |
The cancel should work. After the first chevuk is accepted, só dont allow
your user to delete a file before having the first chunk
Em qui, 12 de mar de 2020 12:27, Mehmet <[email protected]> escreveu:
… @PauloPeres <https://github.com/PauloPeres> is there any way to abort an
chunk upload? Because item.cancel() not workinkg in chunk model.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#977 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7CFFSNUYXE7ZEC5SGQWPDRHD5NZANCNFSM4EQC5GMQ>
.
|
@PauloPeres i cancel process in |
@PauloPeres Is commit 5a84b9e#diff-b8aa3b862dc83fee3efcdc29e54d959b valid ? I want to handle failed chunk upload |
sorry for the delay
i'm trying to work that on a separated npm package
but for now the latests commits are in the : https://github.com/myog-io/ngx-chunk-file-upload
Kind Regards
Paulo Peres Jr
Phone: +1 (818) 279-3840 (tel:+1%20(818)%20279-3840)
WhatsApp: +55 14 98225-0396 (https://api.whatsapp.com/send?phone=5514982250396)
…On Apr 9 2020, at 5:47 am, Gopal Zadafiya ***@***.***> wrote:
@PauloPeres (https://github.com/PauloPeres) does the commit 5a84b9e#diff-b8aa3b862dc83fee3efcdc29e54d959b (5a84b9e#diff-b8aa3b862dc83fee3efcdc29e54d959b) valid ? I want to handle failed chunk upload
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (#977 (comment)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AA7CFFUNCVOYMH6FZJGCF2LRLWDTTANCNFSM4EQC5GMQ).
|
Fixing Issues #880 and #435
With just a few tweeks on the implemations you can use the chunk file upload method.
4 new Parameters
and 1 new callback to change the link of that specifc item on the request