Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIWCustomFileUploader.AcceptFiles
#1
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.
Reply


Messages In This Thread
TIWCustomFileUploader.AcceptFiles - by jeroen.rottink - 10-04-2018, 09:20 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)