<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>18957</bug_id>
          
          <creation_ts>2008-05-08 16:51:46 -0700</creation_ts>
          <short_desc>Allow assignment to value attr of input[type=file] elements via ObjC DOM API</short_desc>
          <delta_ts>2022-08-11 10:06:55 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Todd Ditchendorf">todd</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>adele</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>mitz</cc>
    
    <cc>rniwa</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>79939</commentid>
    <comment_count>0</comment_count>
    <who name="Todd Ditchendorf">todd</who>
    <bug_when>2008-05-08 16:51:46 -0700</bug_when>
    <thetext>Given an HTML element in a DOM:

&lt;input type=&quot;file&quot;&gt;

AFAICT, you cannot programmatically set the value of the &quot;value&quot; attribute of this element via the ObjC DOM API. 

I understand that JavaScript is not allowed to set the value of the &quot;value&quot; attr due to security restrictions. But it seems that ObjC should be allowed to set this value attribute, as it wouldn&apos;t be a security risk, no?

thx!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79941</commentid>
    <comment_count>1</comment_count>
    <who name="Todd Ditchendorf">todd</who>
    <bug_when>2008-05-08 16:55:31 -0700</bug_when>
    <thetext>My use case:

I am writing a WebKit-based desktop application, and I want users to be able to easily drag a local file to anywhere on the WebView, to add the file as the value of the &apos;value&apos; attr of an &lt;input type=&quot;file&quot;&gt; element in the current DOM.

I know that you can currently drop a file directly over the input element, but that *does* require a bit more dexterity, and does not work in the case where the input element may be currently hidden or scrolled out of view.

This enhancement would allow me to offer nicer usability.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79946</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-05-08 18:27:50 -0700</bug_when>
    <thetext>Maybe this can be better served by (extensions to) the DOM drag and drop API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79958</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-05-08 23:46:59 -0700</bug_when>
    <thetext>&lt;rdar://problem/5923198&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890618</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-11 10:06:44 -0700</bug_when>
    <thetext>There are various enhancements in WebAPI and JavaScript use cases and in general across browsers, I think this can be achieved easily these days and this enhancement request can be marked as &quot;RESOLVED WONTFIX&quot;.

Please reopen, if you think there is still gap in modern Web standards to achieve this and you can also raise such discussion of gaps in Standards or related WHATWG Github. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>