Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

Getting the local path of file uploaded via Box uploader

Answered
New post

Comments

4 comments

  • Official comment
    Alex Novotny

    Hey Noah, 

    Can you expand further on what you mean by local path? 

    Thanks. 

    Alex, Box Developer Advocate

    Comment actions Permalink
  • NoahK

    Alex,

    Apologies, maybe I mean relative path. What I am trying to do, once a file is dropped in the Box ContentUploader, is to programmatically grab the path of the file on the user's computer, i.e. /Users/user/Desktop/filename.mp4 or whatever it might be. I would then use that path to set the value of 'fileUp' in the code snippet in order to get the file duration. So far I have tried uploader.on('complete'...) and uploader.on('upload'...) but those only seem to return information from the uploaded file in Box. I am hoping there is some way that the ContentUploader knows the file's location that it is uploading from.

    Thanks,

    Noah

    0
    Comment actions Permalink
  • Alex Novotny

    I reached out to our UI Elements team. Grabbing the path from the uploading computer is not a feature of the content uploader. It looks like the web browsers block us from getting that information. 

    Alex 

    0
    Comment actions Permalink
  • NoahK

    Thanks for looking into it Alex, much appreciated!

    0
    Comment actions Permalink

Please sign in to leave a comment.