You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/01/22 09:23:22 UTC

[GitHub] [cordova-plugin-inappbrowser] lorenzo80 opened a new issue #615: Download a served .zip file from inappbrowser through headers

lorenzo80 opened a new issue #615: Download a served .zip file from inappbrowser through headers
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/615
 
 
   # Bug Report
   I've been trying for a couple of days to solve this issue but nothing so far.
   
   The action is called by an input:
   ```php
   <input type="submit" name="cmdfiledownload" id="cmdfiledownload" class="button" >
   ```
   A validator checks if the file has already been generated, and in case creates it before sending it back:
   ```php
   // Process download
   if(is_file($filepath)) {
       header('Content-Description: File Transfer');
       header('Content-Type: application/octet-stream');
       header('Content-Disposition: attachment; filename="'.basename($filepath).'"');
       header('Expires: 0');
       header('Cache-Control: must-revalidate');
       header('Pragma: public');
       header('Content-Length: ' . filesize($filepath));
       ob_clean();
       flush(); // Flush system output buffer
       readfile($filepath);
       exit;
   }
   ```
   
   So, there is never a file URL exposed anywhere on the page.
   Its location is **NOT** into public_html so it can't be reached otherwise.
   
   The system works perfectly in a normal browser (Chrome mobile, AdBlock Beta).
   I just can't make it work into inappbrowser.
   Uploads work without issues.
   
   ## Problem
   No file gets downloaded after clicking the button
   
   ### What is expected to happen?
   The file gets downloaded.
   
   ### What does actually happen?
   Nothing at all.
   
   ### Environment, Platform, Device
   Android; the website is in PHP with bootstrap 4 and jquery
   
   ### Version information
   Cordova 9.0.0 (cordova-lib@9.0.1)
   Other Frameworks: none
   Windows 7 x64, CLI (Android Studio only for SDK Manager)
   
   - [X] I searched for existing GitHub issues
   - [X] I updated all Cordova tooling to most recent version
   - [X] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] jcesarmobile closed issue #615: Download a served .zip file from inappbrowser through headers

Posted by GitBox <gi...@apache.org>.
jcesarmobile closed issue #615: Download a served .zip file from inappbrowser through headers
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/615
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] jcesarmobile commented on issue #615: Download a served .zip file from inappbrowser through headers

Posted by GitBox <gi...@apache.org>.
jcesarmobile commented on issue #615: Download a served .zip file from inappbrowser through headers
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/615#issuecomment-581141351
 
 
   It’s already reported https://github.com/apache/cordova-plugin-inappbrowser/issues/311

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org