Guest User

Untitled

a guest
Apr 29th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. File upload not working using URLRequest in flex
  2. <form id="avatar" enctype="multipart/form-data"
  3. action="http://localhost:8080/alfresco/service/slingshot/profile/uploadavatar?
  4. alf_ticket=TICKET_7475e180e8d258c0341fc745a3a35274d0a06e50"
  5. method="post">
  6.  
  7. <input type="text" name="username" value="ken"/>
  8.  
  9. <input type="file" name="filedata" />
  10. <input type="submit" name="button" value="upload" / /form
  11.  
  12. var uploadURL:URLRequest = new URLRequest();
  13. uploadURL.url="http://localhost:8080/alfresco/service/slingshot/profile/uploadavatar?alf_ticket=TICKET_7475e180e8d258c0341fc745a3a35274d0a06e50"";
  14. uploadURL.method=URLRequestMethod.POST;
  15. uploadURL.contentType="multipart/form-data";
  16. var params:URLVariables = new URLVariables();
  17. params.username ="admin";
  18. params.filedata=fileRef.data;
  19. uploadURL.data = params;
  20. fileRef.upload(uploadURL)
Advertisement
Add Comment
Please, Sign In to add comment