             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()

                        setTimeout(check, 100)
                check()

uploadUrl = (url) ->
    if albumAttached
        albumUI.querySelector('.button').classList.add('hidden')
        albumUI.querySelector('.status').classList.remove('hidden')
        albumUI.querySelector('.status').textContent = 'Processing, please wait...'
        albumUI.querySelector('.result').classList.add('hidden')
    dropArea = document.getElementById('droparea')
    dropArea.style.overflowY = 'scroll'
    dropArea.classList.add('files')
    fileList = document.getElementById('files')
    if Object.keys(uploadedFiles).length == 0
        document.getElementById('files').innerHTML = ''

    file = new MediaFile(url)
    fileList = document.getElementById('files')
    file.preview = createPreview(file.name)
    fileList.appendChild(file.preview)
    file.preview = fileList.lastElementChild
    file.loadPreview()
    API.uploadUrl(file, (result) ->
        file = result.file
        if result.error?
            file.setError(result.error)
            return
        uploadedFiles[file.hash] = file
        if file.status == 'done'
            finish(file)
        else
            worker.postMessage({ action: 'monitor-status', hash: file.hash })
    )


            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) ->
