/
var
/
www
/
html
/
sugardemo
/
include
/
api
/
help
/
Upload File
HOME
<!-- /* * Your installation or use of this SugarCRM file is subject to the applicable * terms available at * http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/. * If you do not agree to all of the applicable terms or do not have the * authority to bind the entity as an authorized representative, then do not * install or use this SugarCRM file. * * Copyright (C) SugarCRM Inc. All rights reserved. */ --> <h2>Overview</h2> <span class="lead"> Saves an image to a temporary folder. </span> <h2>Request Arguments</h2> <table class="table table-hover"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td> format </td> <td> String </td> <td> The data format. Currently accepts 'sugar-html-json'. </td> <td> True </td> </tr> <tr> <td> delete_if_fails </td> <td> Boolean </td> <td> Indicates whether the API is to mark related record deleted if the file upload fails. </td> <td> False </td> </tr> <tr> <td> oauth_token </td> <td> String </td> <td> The oauth_token value. </td> <td> False - Required if only if delete_if_fails is true. </td> </tr> <tr> <td> <image field> </td> <td> String </td> <td> The field and file to populate. <br> Example: <code>{"<image field>":"@\/path\/to\/ExampleImage.png"}</code> </td> <td> True </td> </tr> </tbody> </table> <h3>Request</h3> <pre class="pre-scrollable"> { "format":"sugar-html-json", "delete_if_fails":true, "oauth_token":"8d240d9d-04ea-571b-35ea-513037ed5857", "<image field>":"@\/path\/to\/\/ExampleImage.png" } </pre> <h2>Response Arguments</h2> <table class="table table-hover"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <tr> <td> guid </td> <td> String </td> <td> The temp ID of the image. </td> </tr> </tbody> </table> <h3>Response</h3> <pre class="pre-scrollable"> { "picture":{ "guid":"50a8760d-966f-9d7e-f45c-513037fac8fc" } } </pre> <h2>Change Log</h2> <table class="table table-hover"> <tr> <th>Version</th> <th>Change</th> </tr> <tr> <td> v10 </td> <td> Added <code>/<module>/temp/file/:field</code> POST endpoint. </td> </tr> </table>