Comments (8)
Currently, there is no way to set headers through the directive, we could add it as an option/attribute, would that work for you?
<form ng-upload headers="{ foo: 'bar' }" >
</form>
Other suggestions?
from ngupload.
Hello guys,
Nothin new about custom headers ? I am facing the same problem.
@twilson63 In emergency how should I go to set the headers ?
from ngupload.
Hey Rodier,
NgUpload does a standard form post, so it is not possible to set headers om the request. but s3 supports hidden vars: https://aws.amazon.com/articles/1434
hope this helps
thx
tom
Sent from my iPad
On Jul 30, 2014, at 7:02 AM, Rodier Madiande [email protected] wrote:
Hello guys,
Nothin new about custom headers ? I am facing the same problem.
@twilson63 In emergency how should I go to set the headers ?—
Reply to this email directly or view it on GitHub.
from ngupload.
@twilson63
Hi Tom, thank for your response. My problem was more about the custom headers.
In fact, I 'm using the Angular's CSRF protection mechanisme w/ Node.js and I must to add the token in the headers and not adding the token by a hidden input like your module provide.
from ngupload.
Hey Rodier,
You may want to try XHR2 or a upload control that uses xhr2 - I use xhr2 in
my upload button directive and it works great for current browsers:
https://github.com/twilson63/angular-uploadBtn/blob/master/upload-button-btn.js
There are some controls that provide shims for legacy browsers, as well.
But they will more than likely give you the same problems. Hope this
helps!
Thanks
Tom
On Thu, Jul 31, 2014 at 5:21 AM, Rodier Madiande [email protected]
wrote:
@twilson63 https://github.com/twilson63
Hi Tom, thank for your response. My problem was more about the custom
headers.
In fact, I 'm using the Angular's CSRF protection mechanisme w/ Node.js
and I must to add the token in the headers and not adding the token by a
hidden input like your module provide.—
Reply to this email directly or view it on GitHub
#113 (comment).
Tom Wilson
Jack Russell Software Company Division of CareKinesis
494 Wando Park Blvd
Mount Pleasant, SC 29464
Phone: 843-606-6484
Mobile: 843-469-5856
Email: [email protected]
Web: http://www.jackhq.com
Calendar:
http://www.google.com/calendar/embed?src=tom%40jackrussellsoftware.com&ctz=America/New_York
http://www.jackhq.com/calendar
This e-mail may contain information that is confidential, privileged or
otherwise protected from disclosure by the Health Insurance Portability and
Accountability Act (HIPAA) and other state and federal laws. This
information is intended only for the individual names above. Any review,
use disclosure or dissemination of this material is strictly prohibited.
If you receive this information in error, please notify CareKinesis
immediately at 888-974-2763 and delete the original at once.
from ngupload.
I managed with the directive you mentionned.
Thank you a lot Tom!
from ngupload.
Is there a way to expose the response header (ie: 200, 500) in addition to the content body? https://github.com/twilson63/ngUpload/blob/master/ng-upload.js Can you add it to an example?
from ngupload.
I think the best bet is to use XHR2 then you do have access to the entire response object status codes and all.
Here is an example: https://github.com/twilson63/angular-uploadBtn/blob/master/upload-button-btn.js
from ngupload.
Related Issues (20)
- ngUpload not working on Firefox 27 Mac - returns HTML instead of JSON
- getting a warning in console
- How to prefix file name that is uploaded HOT 10
- Minified version causing form submitted multiple times HOT 7
- 404 not found HOT 2
- Error handling HOT 6
- Auto start upload HOT 3
- custom headers using CORS in IE8 HOT 1
- Minified file not updated HOT 1
- $isLoading should be $isUploading in the readme HOT 1
- ng-upload executing multiple times
- ngUpload is not working HOT 3
- ng-upload.min.js is broken HOT 2
- How can we implement the progress bar for ngUpload? HOT 2
- Bower package is out-of-date HOT 3
- Hidden inputs do not work for objects
- Can we get upload percent in $scope? HOT 1
- BeforeSumbit executes after submit
- Is it possible to register the package on npm? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngupload.