case: suppose we have 2 different applications from one application we are just giving the link from where anyone can upload link (link?q=key) of alfresco site. so at the time of uploading we can validate the key of trusted source and upload the document.
so the basic thing is to give the permission to guest for create content(upload).
Giving Guest access to upload files in the Repo is not a good practice, so you need to handle your internal validation carefully. However, you can use the RESTful Login service (/alfresco/service/api/login?u={username}&pw={password?}) to establish a ticket as an Alfresco user. After you get the authentication ticket, you can use that ticket to execute a javascript webservice that uploads the file. Sample of such webscript can be found here: http://wiki.alfresco.com/wiki/Web_Scripts_Examples#File_Upload
<webscript> <shortname>File Upload Form Sample</shortname> <description>Form for uploading file content and meta-data into Repository</description> <url>/sample/upload</url> <authentication>user</authentication> </webscript>
And
File: upload.post.desc.xml
<webscript> <shortname>File Upload Sample</shortname> <description>Upload file content and meta-data into Repository</description> <url>/sample/upload</url> <authentication>user</authentication> </webscript>