Guest User

Untitled

a guest
Sep 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.20 KB | None | 0 0
  1. <div>
  2. <div>
  3. <form name="myForm">
  4. <fieldset>
  5. <legend>Upload on form submit</legend>
  6. Username: <input type="text" name="userName" ng-model="username" size="39" required="">
  7. <i ng-show="myForm.userName.$error.required">*required</i><br>
  8. Profile Picture: <input type="file" ngf-select="" ng-model="picFile" name="file" ngf-accept="'image/*'" required="">
  9. <i ng-show="myForm.file.$error.required">*required</i>
  10. <br>
  11. <button ng-disabled="!myForm.$valid" ng-click="uploadPic(picFile)">Submit</button>
  12. <img ngf-src="picFile" class="thumb">
  13. <span class="progress" ng-show="picFile.progress >= 0">
  14. <div style="width:{{picFile.progress}}%" ng-bind="picFile.progress + '%'" class="ng-binding"></div>
  15. </span>
  16. <span ng-show="picFile.result">Upload Successful</span>
  17. </fieldset>
  18. <br>
  19. </form>
  20. </div>
  21. <fieldset>
  22. <legend>Play with options</legend>
  23. <div class="up-buttons">
  24. <div ngf-select="" ngf-drop="" ng-model="files" ngf-model-invalid="invalidFiles" ngf-model-options="modelOptionsObj" ngf-multiple="multiple" ngf-pattern="pattern" ngf-accept="acceptSelect" ng-disabled="disabled" ngf-capture="capture" ngf-drag-over-class="dragOverClassObj" ngf-validate="validateObj" ngf-resize="resizeObj" ngf-resize-if="resizeIfFn($file, $width, $height)" ngf-dimensions="dimensionsFn($file, $width, $height)" ngf-duration="durationFn($file, $duration)" ngf-keep="keepDistinct ? 'distinct' : keep" ngf-fix-orientation="orientation" ngf-max-files="maxFiles" ngf-ignore-invalid="ignoreInvalid" ngf-run-all-validations="runAllValidations" ngf-allow-dir="allowDir" class="drop-box" ngf-drop-available="dropAvailable">Select File
  25. <span ng-show="dropAvailable"> or Drop File</span>
  26. </div>
  27. <br>
  28. <div ngf-drop="" ng-model="files" ngf-model-invalid="invalidFiles" ngf-model-options="modelOptionsObj" ngf-multiple="multiple" ngf-pattern="'image/*'" ng-disabled="disabled" ngf-drag-over-class="dragOverClassObj" ngf-validate="validateObj" ngf-resize="resizeObj" ngf-resize-if="resizeIfFn($file, $width, $height)" ngf-dimensions="dimensionsFn($file, $width, $height)" ngf-duration="durationFn($file, $duration)" ngf-keep="keepDistinct ? 'distinct' : keep" ngf-enable-firefox-paste="true" ngf-fix-orientation="orientation" ngf-max-files="maxFiles" ngf-ignore-invalid="ignoreInvalid" ngf-run-all-validations="runAllValidations" ngf-allow-dir="allowDir" class="drop-box" ng-show="dropAvailable">
  29. <span>Paste or Drop Image from browser</span></div>
  30. </div>
  31. <div class="custom">
  32. <label>accept (for select browser dependent): <input type="text" ng-model="acceptSelect"></label><br>
  33. <label>ngf-capture (for mobile): <input type="text" ng-model="capture"></label><br>
  34. <label>ngf-pattern (validate file model): <input type="text" ng-model="pattern"></label><br>
  35. <label>ngf-validate: <input type="text" ng-model="validate" size="49"></label><br>
  36. <label>ngf-drag-over-class (chrome): <input size="31" type="text" ng-model="dragOverClass"></label><br>
  37. <label>ngf-model-options: <input type="text" size="43" ng-model="modelOptions"></label><br>
  38. <label>ngf-resize: <input type="text" size="43" ng-model="resize"></label><br>
  39. <label>ngf-resize-if: <input type="text" size="43" ng-model="resizeIf"></label><br>
  40. <label>ngf-dimensions: <input type="text" size="43" ng-model="dimensions"></label><br>
  41. <label>ngf-duration: <input type="text" size="43" ng-model="duration"></label><br>
  42. <label>ngf-max-files: <input type="text" size="43" ng-model="maxFiles"></label><br>
  43. <label>ngf-ignore-invalid: <input type="text" size="43" ng-model="ignoreInvalid"></label><br>
  44. <label><input type="checkbox" ng-model="multiple">ngf-multiple (allow multiple files)</label>
  45. <label><input type="checkbox" ng-model="disabled">ng-disabled</label><br>
  46. <label><input type="checkbox" ng-model="allowDir">ngf-allow-dir (allow directory drop Chrome
  47. only)</label><br>
  48. <label><input type="checkbox" ng-model="keep">ngf-keep (keep the previous model values in
  49. ng-model)</label><br>
  50. <label><input type="checkbox" ng-model="keepDistinct">ngf-keep="distinct" (do not allow
  51. duplicates)</label><br>
  52. <label><input type="checkbox" ng-model="orientation">ngf-fix-orientation (for exif jpeg files)</label><br>
  53. <label><input type="checkbox" ng-model="runAllValidations">ngf-run-all-validations</label><br>
  54. <label>Upload resumable chunk size: <input type="text" ng-model="chunkSize"></label><br>
  55. </div>
  56.  
  57. <div class="preview">
  58. <div>Preview image/audio/video:</div>
  59. <img ngf-src="!files[0].$error && files[0]">
  60. <audio controls="" ngf-src="!files[0].$error && files[0]"></audio>
  61. <video controls="" ngf-src="!files[0].$error && files[0]"></video>
  62. </div>
  63. </fieldset>
  64. <br>
  65. </div>
Add Comment
Please, Sign In to add comment