Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9115303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:23:56+00:00 2026-06-17T04:23:56+00:00

I’m developing an application for use by our employees for ticket tracking on the

  • 0

I’m developing an application for use by our employees for ticket tracking on the go. Our tickets have attachments stored with them on occasion, of various file types.

Many of them are text files or images of bugs in our software, which are essential to the ticket when checking out the ticket on the go

in Javascript, how can I get the web browser to prompt the user with a ‘what would you like to open this file with?’ dialog? much like the following:

iPhone open file in dialog

I don’t even know if this is possible through Javascript, but if so it would really help us out a lot

I am aware that we can display images in Javascript directly, but we would much rather defer the file off to the device and let it handle opening it with the correct program (in case the file type is not an image)

Oh, and we are using Sencha Touch for the application, in case that offers any features of this sort (though I couldn’t find any in the docs)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:23:57+00:00Added an answer on June 17, 2026 at 4:23 am

    To open with the app:

    • Choose the Info-plist file
    • Right click on plist file
    • Open as… and select Source Code
    • Paste this xml code below somewhere in the file (for the example I will place it below the bundle name)
    <key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeName</key>
            <string>supportedExtensions</string>
            <key>CFBundleTypeRole</key>
            <string>Viewer</string>
            <key>LSHandlerRank</key>
            <string>Alternate</string>
            <key>LSIsAppleDefaultForType</key>
            <true/>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.comma-separated-values-text</string>
            </array>
        </dict>
    </array>
    
    • Go to the app delegate file and implement the following function:
    -(BOOL) application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
    {
        // this url contain the -> your file url
    }
    

    Just remember: the handling of the memory of your app is upbto you. The file will be copied into your Application Document Directory space. You will need to manage it. If you no longer need the file, your application will need to delete it.

    Reading the File in JS:

    Implement the following in your javascript:

    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
    
    function gotFS(fileSystem) {
        fileSystem.root.getFile("exportBHC.csv", {create: true}, gotFileEntry, fail);
    }
    
    function gotFileEntry(fileEntry) {
        fileEntry.file(gotFile, fail);
    }
    
    function gotFile(file){
        readAsText(file);
    }
    
    function readAsText(file) {
        var reader = new FileReader();
    
        reader.onloadend = function(evt) {
            var sqlQuery = {};
            var results = evt.target.result;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bunch of posts stored in text files formatted in yaml/textile (from
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am confused How to use looping for Json response Array in another Array.
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.