4 Replies Latest reply on Aug 11, 2016 9:07 AM by jwilson RSS
    jwilson Explorer

    How to set Image property from Mashup

    I have a ThingTemplate that implements a ThingShape that has an Image property.  I have that a mashup that shows the selected Thing and then shows the Image Property successfully.  I am now attempting to create a mashup that is only available to a small subset of users that have the ability to update a few of those properties, one being the Image Property.  In a mashup how would allow the end user to select a local file on their computer and upload that and set as the image property of the selected Thing.  I do not want to put it in a "File Repository", only update and set the Thing property.

      • Re: How to set Image property from Mashup
        ttielebein Collaborator

        It's not a great idea to do it this way, but you could potentially update the property using a REST call. From a mashup, I am not sure. It would certainly be best just to let the file go to the file repository. Is there any particular reason you do not want it to go to the repository?

          • Re: How to set Image property from Mashup
            jwilson Explorer

            I'm looking for a way for the users to have a consistent interface with only using Mashups as the User Interface.  I see no way to complete the loop with the expectations that a user can select a file from a local folder and have that file uploaded to replace an image associated with individual Things.  The concept of using the File Upload widget which brings in the concept of file repositories which the user could care less about seems like a critical source of error, confusion, and not follow the idea of keeping it simple and straight forward. 

              • Re: How to set Image property from Mashup
                ttielebein Collaborator

                I see your points, but I don't think it will matter too much. You can have a service run immediately after the file uploads to set any properties you need, so from the customer perspective, there may as well not be any file repository at all. I think that using this method with the file repository is actually your best bet for reducing risk of errors since this is how the software is designed to be used. If you are going to try using the REST API for this, you may find a solution, but there is no guaranteeing it will still work in future versions and if it does start to fail, it may be harder to troubleshoot and maintain.

                 

                Let me know your further thoughts on this.