Hi,

I tried ajax file upload with some images and I discover an issue with IE9
(yes, again...).
In, fact, this is this issue:
http://stackoverflow.com/questions/9230779/ie9-prompts-user-on-submission-of-hidden-iframe
IE9 doesn't like the content-type of the json rendered.

Then, it asks me if I want to open the js file like I tried to download a
file.

Also, I have this declared in application.dryml :
<def tag="input" for="Paperclip::Attachment" attrs="size">
  <% size||="thumb" %>
  <if test="&this.exists?">
    <view size="&size"/>
  </if>
  <%= file_field_tag param_name_for_this, attributes %>
</def>

<def tag="view" for="Paperclip::Attachment" attrs="size">
  <%= image_tag this.url size %>
</def>

(Yes, I tried to use <view merge-attrs/> in the input tag but this seems
not working).

And in the view:
        <do part="photo">
          <form update="photo" multipart>
            <input:photo size="normal"/>
            <div class="actions">
              <submit label="#{ht 'ad.actions.save', :default=>['Save']}"/>
            </div>
          </form>
        </do>
Then, the image is shown in the input tag.
The goal is to upload the photo and then, update the part so that the photo
is changed directly.

While uploading a photo, the part is quite well upadted but I receive an
error because it tries to download also the old image.
I debugged that with chrome and the need for this old image is coming from
the javascript jquery.js from jquery-rails:
clone = elem.cloneNode( true );
(around line 6084).

I can live with the second issue since ajax file upload is not often used,
but it's better it works with IE9.
I think I can correct this issue while modifying the controller.

I'll do that tomorrow, since it's already late here...

Best regards,
Arnaud.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to