UNPKG

prisme-flow

Version:

prisme platform flow engine

51 lines (46 loc) 1.98 kB
<!-- Created by prisme.io on 09/06/2017. @author <a href="mailto:hello@prisme.io">savane vamara</a> (prisme.io) --> <script type="text/x-red" data-template-name="file-upload"> <div class="form-row"> <label for="node-input-url"><i class="icon-tasks"></i> URL</label> <input type="text" id="node-input-url" placeholder="http(s)://url"> </div> <div class="form-row"> <label for="node-input-file"><i class="icon-tasks"></i> File</label> <input type="text" id="node-input-file" placeholder=""> </div> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> <div class="form-tips">The <b>Base URL</b> gets prepended to whatever payload is passed in. Leave blank if you pass in a full url. <br/>The append gets added to the end after any payload.<br/>The output Topic is the same as the input Topic.</div> </script> <script type="text/x-red" data-help-name="file-upload"> <p>Performs an HTTP or HTTPS GET and returns the fetched page.</p> <p>The return code is placed in <b>msg.rc</b>, and the full text of the result is in <b>msg.payload</b>.</p> <p>The <b>msg.payload</b> is added to the base url, and then the optional append is added after.</p> <p>This is mostly suitable for small pages as large results will need a lot of parsing....</p> </script> <script type="text/javascript"> RED.nodes.registerType('file-upload',{ category: 'function', color:"rgb(231, 231, 174)", defaults: { name: {value:""}, url: {value:""}, file: {value:""} }, inputs:1, outputs:1, icon: "fileupload.png", label: function() { return this.name || 'file upload'; }, labelStyle: function() { return this.name?"node_label_italic":""; } }); </script>