<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Dropzone Forums — Script to upload a file to FTP, wait and upload the next file]]></title>
		<link>https://forums.aptonic.com/topic/181/script-to-upload-a-file-to-ftp-wait-and-upload-the-next-file/</link>
		<atom:link href="https://forums.aptonic.com/feed/rss/topic/181/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Script to upload a file to FTP, wait and upload the next file.]]></description>
		<lastBuildDate>Fri, 12 Sep 2014 11:25:36 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Script to upload a file to FTP, wait and upload the next file]]></title>
			<link>https://forums.aptonic.com/post/549/#p549</link>
			<description><![CDATA[<p>Hi Alan,</p><p>I&#039;ve made you a custom version of the FTP action that waits 8 minutes between uploads. If you need to change the delay, you can edit the ftp_custom.rb file inside the action bundle and change line 96. The trick was there&#039;s another library bundled with Dropzone that does the actual uploading so I&#039;ve made you a custom version of this lib and bundled it along with the action.</p><p>You can download the action here: <a href="http://shipsomecode.com/misc/FTP%20Upload%20With%20Delay.dzbundle.zip">http://shipsomecode.com/misc/FTP%20Uplo … bundle.zip</a><br />Unzip it and double click the &quot;FTP Upload With Delay.dzbundle&quot; action bundle to add it to your grid.</p>]]></description>
			<author><![CDATA[null@example.com (John)]]></author>
			<pubDate>Fri, 12 Sep 2014 11:25:36 +0000</pubDate>
			<guid>https://forums.aptonic.com/post/549/#p549</guid>
		</item>
		<item>
			<title><![CDATA[Re: Script to upload a file to FTP, wait and upload the next file]]></title>
			<link>https://forums.aptonic.com/post/548/#p548</link>
			<description><![CDATA[<p>I had a little play and have a script based on the standard FTP one but when I add three small files it doesn&#039;t wait between files so not sure where I need to pause in the loop (so to speak).</p><p># Dropzone Action Info<br /># Name: FTP Upload Copy<br /># Description: Allows files to be uploaded to a remote FTP server. <br /># Handles: Files<br /># Creator: Aptonic Software<br /># URL: <a href="http://aptonic.com">http://aptonic.com</a><br /># OptionsNIB: ExtendedLogin<br /># Events: Dragged, TestConnection<br /># KeyModifiers: Option<br /># SkipConfig: No<br /># RunsSandboxed: Yes<br /># Version: 1.0<br /># MinDropzoneVersion: 3.0</p><p>$host_info = {:server&nbsp; &nbsp; =&gt; ENV[&#039;server&#039;],<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :port&nbsp; &nbsp; &nbsp; =&gt; ENV[&#039;port&#039;],<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :username&nbsp; =&gt; ENV[&#039;username&#039;],<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :password&nbsp; =&gt; ENV[&#039;password&#039;]}</p><p>def dragged<br />&nbsp; delete_zip = false<br />&nbsp; <br />&nbsp; items = $items<br />&nbsp; <br />&nbsp; $dz.begin(&quot;Starting transfer...&quot;)<br />&nbsp; $dz.determinate(false)<br />&nbsp; <br />&nbsp; remote_paths = <a href="http://FTP.do">FTP.do</a>_upload(items, ENV[&#039;remote_path&#039;], $host_info)<br />&nbsp; # ZipFiles.delete_zip(items) if delete_zip<br />&nbsp; <br />&nbsp; # Put URL of uploaded file on pasteboard<br />&nbsp; finish_text = &quot;Upload Complete&quot;<br />&nbsp; <br />&nbsp; if remote_paths.length == 1<br />&nbsp; &nbsp; filename = remote_paths[0].split(File::SEPARATOR)[-1].strip<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; if ENV[&#039;root_url&#039;] != nil<br />&nbsp; &nbsp; &nbsp; slash = (ENV[&#039;root_url&#039;][-1,1] == &quot;/&quot; ? &quot;&quot; : &quot;/&quot;)<br />&nbsp; &nbsp; &nbsp; url = ENV[&#039;root_url&#039;] + slash + filename<br />&nbsp; &nbsp; &nbsp; finish_text = &quot;URL is now on clipboard&quot;<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; url = filename<br />&nbsp; &nbsp; end<br />&nbsp; else<br />&nbsp; &nbsp; url = false<br />&nbsp; end<br />&nbsp; sleep 600<br />&nbsp; $dz.finish(finish_text)<br />&nbsp; $dz.url(url)<br />end</p><p>def test_connection<br />&nbsp; <a href="http://FTP.test">FTP.test</a>_connection($host_info)<br />end</p>]]></description>
			<author><![CDATA[null@example.com (AlanJ)]]></author>
			<pubDate>Thu, 11 Sep 2014 14:17:00 +0000</pubDate>
			<guid>https://forums.aptonic.com/post/548/#p548</guid>
		</item>
		<item>
			<title><![CDATA[Script to upload a file to FTP, wait and upload the next file]]></title>
			<link>https://forums.aptonic.com/post/547/#p547</link>
			<description><![CDATA[<p>Hi,</p><p>I have just purchased DropZone as it looks like a nice programme and I love the idea of the scripting options.</p><p>I have been looking at the FTP script as what I am trying to create is a script that uploads a file to a ftp server, waits 5 minutes and then starts the next transfer.&nbsp; Its important that it only uploads one file at a time and then waits long enough for the script on the other end to start processing.</p><p>Can I simple add some kind of pause to the default script?</p><p>Anyone got any ideas or suggestions?</p><p>Alan</p>]]></description>
			<author><![CDATA[null@example.com (AlanJ)]]></author>
			<pubDate>Thu, 11 Sep 2014 13:54:55 +0000</pubDate>
			<guid>https://forums.aptonic.com/post/547/#p547</guid>
		</item>
	</channel>
</rss>
