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

Preload file constrains for directives on the client #32

Closed
gsuess opened this issue Dec 21, 2014 · 1 comment
Closed

Preload file constrains for directives on the client #32

gsuess opened this issue Dec 21, 2014 · 1 comment
Assignees

Comments

@gsuess
Copy link
Contributor

gsuess commented Dec 21, 2014

It would be good to allow the client to validate the file against the size and file-type before making a round trip to the meteor server, without having to duplicate the parameters in the directive server side and client side.

In a nutshell something along the lines of:

var uploader = new Slingshot.Upload("myDirective");

if (file.size <= uploader.maxSize)
   uploader.send(file);
else
   this.error.set("File is too large");
Pagebakers added a commit that referenced this issue Dec 29, 2014
Pagebakers added a commit that referenced this issue Dec 29, 2014
Pagebakers added a commit that referenced this issue Dec 30, 2014
Pagebakers added a commit that referenced this issue Dec 30, 2014
Pagebakers added a commit that referenced this issue Dec 30, 2014
gsuess added a commit that referenced this issue Jan 4, 2015
gsuess added a commit that referenced this issue Jan 4, 2015
#32: File constraints now available on both client and server
@gsuess
Copy link
Contributor Author

gsuess commented Jan 4, 2015

Fixed with #35

@gsuess gsuess closed this as completed Jan 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants