Alpha Video Training
Results 1 to 3 of 3

Thread: File Upload - User Defined

  1. #1
    Member
    Real Name
    Wayne
    Join Date
    Aug 2009
    Posts
    129

    Default File Upload - User Defined

    Been using a custom xbasic function to upload files for my app.

    I use the following to get the file name into a string

    e.fileArray[i].fileName

    Whole function is actually

    fn = "\\q-srv1\DMS\Notes" + chr(92) + (convert_type(e.primaryKeyArray[1],"N")) + timestamp + e.fileArray[i].fileName

    Anyone know how to get just the file type as a function?

    Reason: I store the filename plus timestamp to randomize. Well, sometimes people try to upload a file with an illegal character. It will upload, but it truncates and you can never re-download.

    My plan is to remove the filename part of the function above, insert a random number. Then, no matter what the file is named, it gives it a number for the file on the backend. Nice and clean.

    I can get that part to work.... but, I need to append the file type at the end so it will redownload or render in the browser later... ie, 234982739487.pdf

  2. #2
    Member
    Real Name
    mumfie
    Join Date
    Dec 2008
    Location
    UK
    Posts
    197

    Default Re: File Upload - User Defined

    see

  3. #3
    Member
    Real Name
    Wayne
    Join Date
    Aug 2009
    Posts
    129

    Default Re: File Upload - User Defined

    Thanks....

    I will give it a shot in naming e.fileArray[i].fileName as the filename in that function and see if she works.

    I appreciate the response.

    Wayne

Similar Threads

  1. File Upload - User Defined, Refreshing the Child Grid
    By Al Buck in forum Application Server Version 10 - Web/Browser Applications
    Replies: 8
    Last Post: 08-30-2011, 10:13 AM
  2. User Defined File Upload Feature - multiple files into grid.
    By spmat in forum Application Server Version 10 - Web/Browser Applications
    Replies: 1
    Last Post: 08-07-2011, 03:29 PM
  3. File Upload - User Defined - Unique
    By qcorporation in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 10-18-2010, 11:07 PM
  4. File Upload - User Defined Action
    By omagarc in forum Application Server Version 10 - Web/Browser Applications
    Replies: 1
    Last Post: 10-07-2010, 02:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •