<?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: upload file in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/upload-file/m-p/114788#M31864</link>
    <description>&lt;P&gt;To complete this list, we could add "bulk importing" &lt;A href="https://docs.alfresco.com/5.2/concepts/Bulk-Import-Tool.html" target="_self" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/Bulk-Import-Tool.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Sep 2019 10:58:46 GMT</pubDate>
    <dc:creator>joreun</dc:creator>
    <dc:date>2019-09-23T10:58:46Z</dc:date>
    <item>
      <title>upload file</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-file/m-p/114785#M31861</link>
      <description>how many ways or how to upload file in alfresco folder path&amp;nbsp; directly without&amp;nbsp;get access or login .and how to display one custom editable form in&amp;nbsp; alfresco rather then default home page of alfresco right after login.</description>
      <pubDate>Wed, 04 Sep 2019 13:00:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-file/m-p/114785#M31861</guid>
      <dc:creator>rekhaahir</dc:creator>
      <dc:date>2019-09-04T13:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: upload file</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-file/m-p/114786#M31862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no way you can upload files into alfresco without login or without getting access token (alf_ticket). If you allow doing this then it will be risky.&lt;/P&gt;&lt;P&gt;There are several ways you can upload files to alfresco repo:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- Using share (drag and drop files into a folder, with latest version you can drag and drop folders as well. It will create subfolder within parent folder and upload files).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.alfresco.com/6.0/tasks/library-add-content.html" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/6.0/tasks/library-add-content.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.alfresco.com/6.0/tasks/library-folder-dragdrop.html" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/6.0/tasks/library-folder-dragdrop.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2- Using REST API :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="27978" class="image-1 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/27978_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Java based implementation example:&amp;nbsp;&lt;A href="https://javaworld-abhinav.blogspot.com/2014/09/upload-documents-to-alfresco-using-rest.html" rel="nofollow noopener noreferrer"&gt;https://javaworld-abhinav.blogspot.com/2014/09/upload-documents-to-alfresco-using-rest.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3- Upload using FTP:&amp;nbsp;&lt;A href="https://docs.alfresco.com/6.1/concepts/fileserv-ftp-intro.html" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/6.1/concepts/fileserv-ftp-intro.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;4- Upload using webdav,&amp;nbsp;It is ready to use from the moment you install Alfresco. Simply go to &lt;A href="http://yourhost/alfresco/webdav" rel="nofollow noopener noreferrer"&gt;http://&amp;lt;host&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ort&amp;gt;/alfresco/webdav&lt;/A&gt;. Set up webdav location on windows:&amp;nbsp;&lt;A href="https://uvacollab.screenstepslive.com/s/help/m/sitetools/l/611578-how-do-i-set-up-webdav-for-windows-10-or-8" rel="nofollow noopener noreferrer"&gt;https://uvacollab.screenstepslive.com/s/help/m/sitetools/l/611578-how-do-i-set-up-webdav-for-windows-10-or-8&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5- Upload using CIFS:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/concepts/fileserv-subsystem-CIFS.html" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/fileserv-subsystem-CIFS.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use this chrome extension to upload files in a folder:&amp;nbsp;&lt;A href="https://github.com/abhinavmishra14/alfresco-upload" rel="nofollow noopener noreferrer"&gt;https://github.com/abhinavmishra14/alfresco-upload&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if it is still working with latest versions but refer this project which allows selecting custom metadata, it will give you some idea on implementation:&amp;nbsp;&lt;A href="https://github.com/softwareloop/uploader-plus" rel="nofollow noopener noreferrer"&gt;https://github.com/softwareloop/uploader-plus&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 14:00:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-file/m-p/114786#M31862</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2019-09-04T14:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: upload file</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-file/m-p/114787#M31863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;this is&amp;nbsp; my&amp;nbsp; custom.ftl file wihch is html file and it will calling webscript and load js file into it. (share side)&lt;/P&gt;&lt;P&gt;&amp;lt;#-- JavaScript Dependencies&lt;BR /&gt;&amp;lt;@markup id="js"&amp;gt;&lt;BR /&gt;&amp;lt;/@&amp;gt;&lt;BR /&gt;--&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;#-- Stylesheet Dependencies&lt;BR /&gt;&amp;lt;@markup id="css"&amp;gt;&lt;BR /&gt;&amp;lt;/@&amp;gt;&lt;BR /&gt; --&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;#-- Surf Widget creation&lt;BR /&gt;&amp;lt;@markup id="widgets"&amp;gt;&lt;BR /&gt; &amp;lt;@createWidgets group="dashlets"/&amp;gt;&lt;BR /&gt;&amp;lt;/@&amp;gt;&lt;BR /&gt;--&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;@markup id="html"&amp;gt;&lt;BR /&gt; &amp;lt;@uniqueIdDiv&amp;gt;&lt;BR /&gt; &amp;lt;#assign id = args.htmlid?html&amp;gt;&lt;BR /&gt; &amp;lt;#assign dashboardconfig=config.scoped['Dashboard']['dashboard']&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div class="dashlet"&amp;gt;&lt;BR /&gt; &amp;lt;div class="title"&amp;gt;Custom Dashlet&amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;div id="${id}-memberdir" class="body"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &amp;lt;div class="toolbar"&amp;gt;&lt;BR /&gt; &amp;lt;div class="actions"&amp;gt;&lt;BR /&gt; &amp;lt;form id="UploadForm" action="" method="post" enctype="multipart/form-data" accept-charset="utf-8"&amp;gt;&lt;BR /&gt; File: &amp;lt;input type="file" name="file" id="fu"&amp;gt;&amp;lt;br&amp;gt;&lt;BR /&gt; Title: &amp;lt;input name="title"&amp;gt;&amp;lt;br&amp;gt;&lt;BR /&gt; Description: &amp;lt;input name="description"&amp;gt;&amp;lt;br&amp;gt;&lt;BR /&gt; &amp;lt;input type="button" value="Create" onClick="callPost()" &amp;gt;&lt;BR /&gt; &amp;lt;/form&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/@&amp;gt;&lt;BR /&gt;&amp;lt;/@&amp;gt; &lt;BR /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/P&gt;&lt;P&gt;function callPost() {&lt;BR /&gt;var title=document.getElementById("title");&lt;/P&gt;&lt;P&gt;Alfresco.util.Ajax.request({&lt;BR /&gt; url:Alfresco.constants.PROXY_URI +'/tutorials1/upload',&lt;BR /&gt; method:Alfresco.util.Ajax.POST, &lt;BR /&gt; dataObj:&lt;BR /&gt; {&lt;BR /&gt; &lt;BR /&gt; }, &lt;BR /&gt; successCallback:&lt;BR /&gt; { &lt;BR /&gt; fn: this.success, &lt;BR /&gt; scope:this&lt;BR /&gt; &lt;BR /&gt; },&lt;BR /&gt; failureCallback:&lt;BR /&gt; {&lt;BR /&gt; fn: this.failure, &lt;BR /&gt; scope:this&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; alert("ok");&lt;BR /&gt;}&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 ..repo side upload.js file&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// extract file attributes&lt;BR /&gt;var title = args.title;&lt;BR /&gt;var description = args.description;&lt;/P&gt;&lt;P&gt;// extract file&lt;BR /&gt;var file = null;&lt;BR /&gt;for each (field in formdata.fields)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//error comes here&lt;BR /&gt;{&lt;BR /&gt; if (field.name == "file" &amp;amp;&amp;amp; field.isFile)&lt;BR /&gt; {&lt;BR /&gt; file = field;&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// ensure file has been uploaded&lt;BR /&gt;if (file.filename == "")&lt;BR /&gt;{&lt;BR /&gt; status.code = 400;&lt;BR /&gt; status.message = "Uploaded file cannot be located";&lt;BR /&gt; status.redirect = true;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt; // create document in company home from uploaded file&lt;BR /&gt; upload = companyhome.createFile(file.filename) ;&lt;BR /&gt; upload.properties.content.guessMimetype(file.filename);&lt;BR /&gt; upload.properties.content.write(file.content);&lt;BR /&gt; upload.properties.title = title;&lt;BR /&gt; upload.properties.description = description;&lt;BR /&gt; upload.save();&lt;BR /&gt; // setup model for response template&lt;BR /&gt; model.upload = upload;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;so it will gives error that&amp;nbsp;&lt;STRONG style="font-weight: 400; "&gt;formdata is not define ...may be its possible that bcoz of i use ajax call its not get formdata.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-weight: 400; "&gt;otherwise i should use&amp;nbsp;&lt;BR /&gt; &amp;lt;form action="${url.service}" method="post" enctype="multipart/form-data"&amp;gt; to call.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-weight: 400; "&gt;i.e in action tag with repo url but it's not working.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-weight: 400; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2019 05:05:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-file/m-p/114787#M31863</guid>
      <dc:creator>rekhaahir</dc:creator>
      <dc:date>2019-09-10T05:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: upload file</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-file/m-p/114788#M31864</link>
      <description>&lt;P&gt;To complete this list, we could add "bulk importing" &lt;A href="https://docs.alfresco.com/5.2/concepts/Bulk-Import-Tool.html" target="_self" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/Bulk-Import-Tool.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 10:58:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-file/m-p/114788#M31864</guid>
      <dc:creator>joreun</dc:creator>
      <dc:date>2019-09-23T10:58:46Z</dc:date>
    </item>
  </channel>
</rss>

