             mediaFile.updateStatus('local-pending')
             uploadedFiles[mediaFile.hash] = mediaFile
         )(file)
-    if pendingFiles.length > 0
+    for url in urls
+        ((url) ->
+            mediaFile = new MediaFile(url)
+            mediaFile.preview = createPreview(mediaFile.name)
+            _ = scrollingContainer.scrollTop
+            fileList.appendChild(mediaFile.preview)
+            scrollingContainer.scrollTop = _
+            mediaFile.preview = fileList.lastElementChild
+            mediaFile.loadPreview()
+            mediaFile.hash = new String(guid())
+            mediaFile.updateStatus('local-pending')
+            uploadedFiles[mediaFile.hash] = mediaFile
+        )(url)
+    if pendingFiles.length + pendingUrls.length > 0
         setTimeout(updateQueue, 500)
     if files.length > 0
         uploadPendingFiles()

pendingFiles = []
updateQueue = ->
    files = pendingFiles.splice(0, 5)
    fileList = document.getElementById('files')
    scrollingContainer = document.getElementById('droparea')
    for file in files

            toUpload.push(file)
    for file in toUpload
        ((file) ->
            if file.isUrl
                uploadUrlFile(file)
            else
                reader = new FileReader()
                reader.onloadend = (e) ->
                    try
                        data = e.target.result
                        file.updateStatus('preparing')
                        worker.postMessage({ action: 'compute-hash', data: data, callback: 'hashCompleted', id: file.hash })
                    catch e # Too large
                        uploadFile(file)
                reader.readAsBinaryString(file.file)
        )(file)

hashCompleted = (id, result) ->
