Wie lassen sich Filepicker und Turbolinks gut zusammenspielen?

Ich entwickle eine Web-App mit Rails 3.2, Turbolinks und Filepicker.io

Ich lade den API-Schlüssel so (coffeescript). Meiner Ansicht nach$(document).ready reicht aus, da das Filepicker-Skript bei der ersten Anfrage einmalig geladen wird.

$(document).ready ->
  filepicker.setKey "MY_KEY"

Ich lade Filepicker mit folgendem (coffeescript). Ich sollte beachten, dass ich das verwendejquery-turbolinks Juwel, das die Unterstützung für Turbolinks direkt in jquery baut.

jQuery ->
  $("#publications_bulk-new #upload-button").on "click", ->
    form = $(this).closest('form')
    filepicker.pickAndStore

Wenn ich die Seite direkt besuche, funktioniert der Filepicker wie erwartet. Wenn ich die Seite jedoch mit einer Turbolink-Anfrage besuche, kann ich keine Datei hochladen.

Ich kann das Formular öffnen, in Dropbox browsen usw. Beim Hochladen wird jedoch die folgende Fehlermeldung in rot angezeigt:

Cannot send results to the applicaiton. Sorry about this, it's our fault. Please close this window and try again.

Ein erneuter Versuch hilft nicht.

Ich habe die Konsole von Chrome 28.0 auf Fehlermeldungen überprüft und Folgendes festgestellt:

Blocked a frame with origin "https://www.filepicker.io" from accessing a frame with origin "http://placeholder.library.dev".  The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
 main.js:7
u main.js:7
l main.js:7
i.uploadFiles main.js:7
v.onFileDrop main.js:7
r lodash.min.js:6
(anonymous function) main.js:7

Uncaught Communication iframe not found main.js:7
u main.js:7
l main.js:7
i.uploadFiles main.js:7
v.onFileDrop main.js:7
r lodash.min.js:6
(anonymous function)
Update 29.07.2013 "Protokolle, Domänen und Ports müssen übereinstimmen"

Ich habe den aktuellen Code in meine Produktionsumgebung übertragen, da die Meldung besagt, dass dies von der fehlenden SSL-Verschlüsselung meiner (Entwicklungs-) Seite abhängt.

Leider ist dies nicht das einzige Problem

Blocked a frame with origin "https://www.filepicker.io" from accessing a frame with origin "https://jkreutz.mylibrar.io". Protocols, domains, and ports must match. main.js:7
u main.js:7
l main.js:7
i.uploadFiles main.js:7
v.onFileDrop main.js:7
r lodash.min.js:6
(anonymous function) main.js:7
Uncaught Communication iframe not found main.js:7
u main.js:7
l main.js:7
i.uploadFiles main.js:7
v.onFileDrop main.js:7
r lodash.min.js:6
(anonymous function)

Antworten auf die Frage(2)

Ihre Antwort auf die Frage