Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix] stdlib: upload

  • Loading branch information...
commit 4f8969f7b743b0ebdda57021e5475714192adbc2 1 parent 742e60a
Hugo Heuzard authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 stdlib/upload/upload.opa
View
8 stdlib/upload/upload.opa
@@ -132,10 +132,14 @@ Upload = {{
upload_url = DynamicResource.publish(resource, config.url_parameters)
idframe = Random.string(10)
<iframe name={idframe}
- id={idframe} src="#"
+ id={idframe} src="{fake_url}"
style="width:0;height:0;border:0px solid #fff;"/>
<form action="{upload_url}" id="upload_form" target={idframe}
method="post" enctype="multipart/form-data">
{config.body_form}
- </form>
+ </form>;
+
+ @private dummy_page = Resource.raw_text("")
+ @private @publish
+ fake_url = DynamicResource.publish(dummy_page, {consumption={unlimited}; expiration={none}; visibility={shared}})
}}
Please sign in to comment.
Something went wrong with that request. Please try again.