Questions tagged [filereference]

A file reference is an object that allows programs to refer to files on a file system, and operate on them. Browser-based applications (e.g. JavaScript and ActionScript) need them to save and upload files to / from the user's file system because all file system interaction is policed by the browser itself.

A file reference is an object available in most programming languages' libraries.

In ActionScript, file upload and download must be done through the FileReference class, and the Flash Player has to channel those requests to the hosting browser.

172 questions
1
vote
1 answer

flex - check image dimensions before upload using filereference

In my Flex application, I use a FileReferenceList that the user can populate with multiple files using fileList.browse() before upload. I check each file's size and use fileList[i].upload() to upload to my server, this works fine. I have a suspicion…
adam
  • 22,404
  • 20
  • 87
  • 119
1
vote
1 answer

FileReference supports files larger than 4 gb... what's the point?

Recently reading FileReference manual on Adobe LiveDocs, I stumbled upon an interesting note in the description for the size property, that I've never noticed before: Note: In the initial version of ActionScript 3.0, the size property was defined…
jayarjo
  • 16,124
  • 24
  • 94
  • 138
1
vote
2 answers

Flex 4 FileReference Issues With Firefox

I'm trying to perform a file upload using a FileReference from a Flex app running in Firefox 4. However when I attempt to call the upload() method, the Filereference throws an IOError with the following Error #2038: File I/O Error. URL:…
Alex Beardsley
  • 20,988
  • 15
  • 52
  • 67
1
vote
1 answer

WCF REST Upload File (some files succeed - 200, some fail - 400 Bad Request)

Here's my WCF REST endpoint: [WebInvoke(Method = "POST", UriTemplate = "_test/upload")] public void UploadImage(Stream data) { WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.OK; try { var parser = new…
Ed Sinek
  • 4,829
  • 10
  • 53
  • 81
1
vote
2 answers

Reference file from Azure function 2.0 with .net core

I am trying to create an Azure function that reads from a .mmdb file GeoLite2 Country DB I have added the geolite2 file next to my function. But I cannot find a way programmatically to reference the file path such that it remains the same on my…
1
vote
1 answer

Air app, get full path when opening file with FIleReference

I'm using FileReference to open a file, but I can only get the file name that the user selected, not the full path. Can I get the complete file path, or is there a security issue? Or should I use another approach? private function…
dt1000
  • 3,684
  • 6
  • 43
  • 65
1
vote
1 answer

Flex 3 + Flash Player 10 FileReference save function

Possible Duplicate: help, losing extension when use FileReference download Hi! I'm having an issue that looks common when using the FileReference class in FP10 when saving a file. The whole thing works fine as long as I don't change the default…
BS_C3
  • 385
  • 1
  • 6
  • 23
1
vote
1 answer

Why won't loading js once doesn't work when css works?

This loads css only once just fine. if (filetype=="css" && !document.querySelector('.load_once') ) { var fileref=document.createElement("link") fileref.setAttribute("rel", "stylesheet") fileref.setAttribute("type", "text/css") …
HackYa
  • 105
  • 2
  • 10
1
vote
1 answer

Save local file in Flash Projector using FileReference?

I'm making a Flash projector which will be distributed on CD. I want to allow people to copy files off of the CD. Is this possible? Should I be using FileReference?
Moshe
  • 57,511
  • 78
  • 272
  • 425
1
vote
1 answer

Uploading data with Flex and getting the bytes sent

I want to upload data (not a local file) with Flex (4.1), and show what the progress is of the bytes sent. Now I use a URLLoader, but I know that URLLoader was designed to download data, I can connect a listener to ProgressEvent.PROGRESS but that…
1
vote
1 answer

Flex, FileReferences upload() error in firefox

swf file in https zone, upload script in http zone. File upload fine in ie, and not work on firefox, opera. this code: request.url = this.main.serverHostUpload + "/upload_web.php"; request.method = URLRequestMethod.POST; request.contentType =…
user445606
  • 11
  • 1
1
vote
2 answers

Can Action Script FileReference object be sent to Javascript and converted to File object?

In Action Script, FileReference.browse() is called. I would like to send the chosen file to Javascript and convert it to File object, just like if I would press the Browse button of the javascript
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
1
vote
2 answers

Flex FileReference upload() and .data ... does this load the whole file into memory?

I need to upload a very large file to my server, through my Flex application, and I see that Flex Filereference upload() seems to be able to handle it. Does the upload() methods uploads a 'stream' to the servlet, or does it sends the whole ByteArray…
Sergio Vera
  • 177
  • 1
  • 3
  • 12
1
vote
1 answer

Storing a FileReference in a SharedObject

I would like to store a FileReference object somehow and load it when the SWF loads again. I tried to use the SharedObject class but it does not seem to work. I suspect that what I want to do is not doable due to security issues (not using Adobe…
Rudy
  • 259
  • 1
  • 13
1
vote
1 answer

Limit on FileReference uploads?

I am currently uploading files in ActionScript 3 using the upload() method of the FileReference class. I built an uploader than can do simultaneous or parallel uploads, having a variable set the number of maximum uploads at a time. I noticed that…
Rudy
  • 259
  • 1
  • 13