<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Featurelayer.addAttachment problem in flex in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/featurelayer-addattachment-problem-in-flex/m-p/578423#M13042</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Because of this Flash Player security restriction, you have to call featureLayer.addAttachment() after a button click. For example, if you have a button letting them choose a file using a FileReference, you need to have another button click before you call addAttachment(). You can't call it directly in the fileReference's complete event handler.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much, it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Jan 2011 08:08:05 GMT</pubDate>
    <dc:creator>ReenaSingh</dc:creator>
    <dc:date>2011-01-20T08:08:05Z</dc:date>
    <item>
      <title>Featurelayer.addAttachment problem in flex</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/featurelayer-addattachment-problem-in-flex/m-p/578421#M13040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am facing problem while using &lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;var objectid:Number = serviceRequestId ;&lt;BR /&gt;var contentType:String ="jpeg";&lt;BR /&gt;var nameAttachment:String ="Service request attachment";&lt;BR /&gt; feature_ServiceRequest_Layer.addAttachment(objectid,_model.uploadedFileContent,_model.uploadedFileName,null,new AsyncResponder(onAttchmentResult,onFault));&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the given error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SecurityError: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at flash.net::URLStream/load()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at flash.net::URLLoader/load()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.ags.utils::MultipartURLLoader/doSend()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.ags.utils::MultipartURLLoader/load()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.ags.tasks::FeatureServiceTask/addAttachment()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.ags.layers::FeatureLayer/addAttachment()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.solutions.csp.views::MainMap/attchImagesToServicerequest()&lt;E&gt;&lt;/E&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.solutions.csp.views::MainMap/onAddComplete_feature_ServiceRequest_Layer()&lt;E&gt;&lt;/E&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at mx.rpc::AsyncResponder/result()&lt;E&gt;&lt;/E&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.ags.tasks::FeatureServiceTask/handleApplyEdits()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; at Function/&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://adobe.com/AS3/2006/builtin::call" rel="nofollow" target="_blank"&gt;http://adobe.com/AS3/2006/builtin::call&lt;/A&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.ags.tasks::BaseTask/handleResult()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at Function/&amp;lt;anonymous&amp;gt;()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at mx.rpc::Responder/result()&lt;E&gt;&lt;/E&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; at mx.rpc::AsyncToken/&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.adobe.com/2006/flex/mx/internal::applyResult()&amp;lt;E&amp;gt;" rel="nofollow" target="_blank"&gt;http://www.adobe.com/2006/flex/mx/internal::applyResult()&lt;E&gt;&lt;/E&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; at mx.rpc.events::ResultEvent/&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()&amp;lt;E&amp;gt;" rel="nofollow" target="_blank"&gt;http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()&lt;E&gt;&lt;/E&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; at HTTPOperation/&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()&amp;lt;E&amp;gt;" rel="nofollow" target="_blank"&gt;http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()&lt;E&gt;&lt;/E&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; at mx.rpc::AbstractInvoker/&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.adobe.com/2006/flex/mx/internal::resultHandler()&amp;lt;E&amp;gt;" rel="nofollow" target="_blank"&gt;http://www.adobe.com/2006/flex/mx/internal::resultHandler()&lt;E&gt;&lt;/E&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at mx.rpc::Responder/result()&lt;E&gt;&lt;/E&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at mx.rpc::AsyncRequest/acknowledge()&lt;E&gt;&lt;/E&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at DirectHTTPMessageResponder/completeHandler()&lt;E&gt;&lt;/E&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at flash.events::EventDispatcher/dispatchEventFunction()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at flash.events::EventDispatcher/dispatchEvent()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at flash.net::URLLoader/onComplete()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please suggest me the solution.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 09:58:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/featurelayer-addattachment-problem-in-flex/m-p/578421#M13040</guid>
      <dc:creator>ReenaSingh</dc:creator>
      <dc:date>2011-01-19T09:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Featurelayer.addAttachment problem in flex</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/featurelayer-addattachment-problem-in-flex/m-p/578422#M13041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Because of this Flash Player security restriction, you have to call featureLayer.addAttachment() after a button click. For example, if you have a button letting them choose a file using a FileReference, you need to have another button click before you call addAttachment(). You can't call it directly in the fileReference's complete event handler.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 15:21:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/featurelayer-addattachment-problem-in-flex/m-p/578422#M13041</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2011-01-19T15:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Featurelayer.addAttachment problem in flex</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/featurelayer-addattachment-problem-in-flex/m-p/578423#M13042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Because of this Flash Player security restriction, you have to call featureLayer.addAttachment() after a button click. For example, if you have a button letting them choose a file using a FileReference, you need to have another button click before you call addAttachment(). You can't call it directly in the fileReference's complete event handler.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much, it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 08:08:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/featurelayer-addattachment-problem-in-flex/m-p/578423#M13042</guid>
      <dc:creator>ReenaSingh</dc:creator>
      <dc:date>2011-01-20T08:08:05Z</dc:date>
    </item>
  </channel>
</rss>

