Atozed Forums
TIWCustomFileUploader.AcceptFiles - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: TIWCustomFileUploader.AcceptFiles (/thread-710.html)



TIWCustomFileUploader.AcceptFiles - jeroen.rottink - 10-04-2018

Hi

I upgraded from IW14.1.3 to IW15.0.13 using Delphi 10.1 Berlin

In a converted project I use TIWCustomFileUploader to give a user the possibility to take and upload a photo. On a Samsung Galaxy S7 with Chrome this stopped working.
The user can't take a photo anymore. On a Lenovo tablet it still works...
Looking at the html (generated using templates) there is a difference in the accept attribute. In IW15 it's '.image/*' instead of 'image/*'.

Code:
<!-- IW14.1.3 -->
<div class="form-group">
  <div class="IWFILEUPLOADERCSS" id="IWFILEUPLOADER" name="IWFILEUPLOADER" tabindex="4">
    <div class="IWFileUploader">
      <div id="IWFILEUPLOADER_drop_area" class="iwfileuploader-drop-area" style="display: none;"><span>Drop files here to upload</span></div>
      <div id="IWFILEUPLOADER_button" class="btn btn-block   " style="position: relative; overflow: hidden; direction: ltr;">Maak een foto<input accept="image/*" type="file" name="iwfu_file_input" id="IWFILEUPLOADER_INPUT" capture="camera" style="position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0;"></div>
      <ul id="IWFILEUPLOADER_list" class="iwfileuploader-list"></ul>
    </div>
  </div>
</div>

<!-- IW15.0.3 -->
<div class="form-group">
  <div class="IWFILEUPLOADERCSS" id="IWFILEUPLOADER" name="IWFILEUPLOADER" style="" tabindex="4">
    <div class="IWFileUploader">
      <div id="IWFILEUPLOADER_drop_area" class="iwfileuploader-drop-area" style="display: none;"><span>Drop files here to upload</span></div>
      <div id="IWFILEUPLOADER_button" class="btn btn-block" style="position: relative; overflow: hidden; direction: ltr;">Maak een foto<input accept=".image/*" type="file" name="iwfu_file_input" id="IWFILEUPLOADER_INPUT" capture="camera" style="position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0;"></div>
      <ul id="IWFILEUPLOADER_list" class="iwfileuploader-list"></ul>
    </div>
  </div>
</div>

In the source procedure TIWCustomFileUploader.SetAcceptFiles(const Value: string); is changed resulting in this behaviour.