FileReader sample

Hello,

does the FileReader sample still work?

https://wiki.appstudio.dev/FileReader

Can’t even find the mentioned TextBox control…

Thx,

Olaf

SORRY!

Got it running after looking at the “ReadAstText” sample project.

Not TextBox - use Input (BS4) instead.

SOLVED!!!

Hi!

On iOS there is not only the option to load from file system, but also photo library and camera.

May this be disabled?

Thx!!!

There is nothing in AppStudio itself - you’ll need to look the APIs you are using.

Below is what I quote from ‘bin file upload’,found from this current web board.search for it.hopes it helps!,best rdgs,tst

function upload(userID, video, type, eventID, itemID)
{
  var tVideo = extractFileName(video); 
  
  window.resolveLocalFileSystemURL(cordova.file.documentsDirectory, function (dir) {
      dir.getFile(tVideo, {create: false}, function (fileEntry) {
          var fileURL = fileEntry.nativeURL;

          var options = new FileUploadOptions();          
          options.fileKey = "file";
          options.fileName = tVideo;
          // you can code and figure out which to use
          options.mimeType = "video/mp4";                 // .mp4, .m4a, .m4p, .m4b, .m4r, .move
          options.mimeType = "video/mpeg";

Hi tst,

thank you very much for your response.

I do not really get it “running”.

I use the “ReadAsText” sample that comes with AppStudio.

Works just fine - but on iOS also options for accessing photo library and camera are shown.

I find no way to “hide” these options…

Best,

Olaf

This is my silly suggestion,what about posting your question at iOS forum?best rdgs,tst
It sounds silly,as I don’t know whether does apple uses the same or similar api…best rdgs,tst
Or,the 3rd choice,nsb premium support.rdgs,tst

1 Like

Thank you very much for your help, @tst!

I have found no solution, yet - as I am working on other app at the moment.

If I find a solution or get any hints I will post it here…

Best wishes, Olaf

Eg.place a msgbox saying :please choose only text file from the inputbox showing next,other options is invalid…before showing the inputbox.best rdgs,tst

1 Like

hm… might be a solution.

I think I will check some other file reader for iOS.

Again, thank you very much, @tst!!!