forked from yogiben/meteor-autoform-file
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
81 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ [email protected] | |
[email protected] | ||
[email protected] | ||
[email protected] | ||
ostrio:[email protected].0 | ||
ostrio:[email protected].1 | ||
ostrio:[email protected] | ||
ostrio:[email protected] | ||
[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
<template name="afFileUpload"> | ||
<input value="{{fileId}}" type="hidden" {{this.atts}}> | ||
{{#if $gt uploadedFile.count 0}} | ||
{{#each uploadedFile}} | ||
<div> | ||
{{#with uploadedFile}} | ||
<div> | ||
{{#if isImage}} | ||
{{> uploadImageDemo}} | ||
</div> | ||
<a data-action="remove-file">Remove</a> | ||
{{/each}} | ||
{{else}} | ||
{{> uploadFileDemo}} | ||
{{/if}} | ||
</div> | ||
<a data-remove-file>Remove</a> | ||
{{else}} | ||
{{#if currentUpload}} | ||
{{#with currentUpload}} | ||
Uploading <b>{{file.name}}</b>: | ||
<span class="progress">{{progress}}%</span> | ||
{{/with}} | ||
{{#with currentUpload}} | ||
Uploading <b>{{file.name}}</b>: | ||
<span class="progress">{{progress}}%</span> | ||
{{else}} | ||
<input class="form-control af-file-upload-capture" type="file"/> | ||
{{/if}} | ||
{{/if}} | ||
<input data-files-collection-upload class="form-control af-file-upload-capture" type="file" /> | ||
{{#if error}} | ||
<span class="help-block">{{error}}</span> | ||
{{/if}} | ||
{{/with}} | ||
{{/with}} | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template name="uploadFileDemo"> | ||
<a href="{{link}}?download=true" target="_top">{{name}}</a> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<template name="uploadImageDemo"> | ||
<img style="width:50%;" src="{{fileURL .}}"/> | ||
<img style="width:50%;max-width:250px;max-height:250px;" src="{{link}}"/> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ Package.describe({ | |
name: "ostrio:autoform-files", | ||
summary: "File upload for AutoForm using ostrio:files", | ||
description: "File upload for AutoForm using ostrio:files", | ||
version: "1.0.0", | ||
version: "1.0.1", | ||
git: "https://github.com/VeliovGroup/meteor-autoform-file.git" | ||
}); | ||
|
||
|
@@ -18,8 +18,11 @@ Package.onUse(function(api) { | |
'ostrio:[email protected]' | ||
]); | ||
|
||
api.addFiles('lib/client/autoform.js', 'client'); | ||
api.addFiles('lib/client/fileUpload.html', 'client'); | ||
api.addFiles('lib/client/fileUpload.js', 'client'); | ||
api.addFiles('lib/client/uploadImageDemo.html', 'client'); | ||
api.addFiles([ | ||
'lib/client/autoform.js', | ||
'lib/client/fileUpload.html', | ||
'lib/client/fileUpload.js', | ||
'lib/client/uploadImageDemo.html', | ||
'lib/client/uploadFileDemo.html' | ||
], 'client'); | ||
}); |