Single File Upload - Flash (swf) - upload

Is it possible to upload files to a server, with flash only? I'm looking for a SWF file that's able to do this task. So my question is:
is it possible to upload a file with flash alone (no PHP or ASP)
in case this is possible: is there a simple SWF-file to do this task which I could use?

is it possible to upload a file with flash alone (no PHP or ASP)
Of course not - how will the server know what to do with the file if there's no server side script?
in case this is possible: is there a simple SWF-file to do this task which I could use?
In general, you'll also need JavaScript (and somewhere to post the file to, so some server-side script).
This one is a self-contained solution: http://code.google.com/p/swfupload/
Otherwise, this jQuery plugin is quite good: http://www.uploadify.com/

Related

In Dart, what's the simplest way to get the bytes of a local file for a web app?

(I'm new to web stuff, I'm sorry for any botched terminology)
I want to make a Gameboy Emulator web app, and the first step in that is reading the bytes of the ROM. Eventually, the user will be able to select the ROM, but right now, I just have 'tetris.gb' in the directory along with 'index.html' and 'out.js' (the output of main.dart run through dart2js).
I've been trying to find an easy way to read the bytes of 'tetris.gb,' and the 'dart:io' library looked promising, but it's not available for browser-based applications.
In the browser you have 2 options.
Load a file from the server using an HTTP GET request.
See for example
Using dart to download a file
Load a file from the users computer using file upload functionality.
See for example File input and Dart
dart:io can only be used on the server or in console or Flutter apps, but not in code running in the browser.

how can i know the physical path from selected file (fileupload bootstrap)

I´m making a web application in MVC, I have a view where I select a file from my pc directory (like opendialog form in windows applications), bootstrap´s fileupload gets the file name but I want to know his physical path to. Because I want to save it in my data base (where file come from).
Anybody can help me??
Thank you in advance!
You can't, this information is never sent to the server for obvious security reasons. Only the filename is sent to the server. So you cannot store the physical path where the file originated from the client machine on your server.
When you upload a file via a web browser, the actual file path is not supplied. This is seen as being a security feature.
There is no way to circumvent this using pure HTML. Some people get around it by using a plugin such as Flash or Silverlight to upload the file, but I recommend living with this feature if you can.

Show files on FTP in a Rails App

We have an FTP site for clients, and they just go to it with a web browser and see the files. I'd like to display the files in a more visually pleasing manner, is there a way I can show what files are on the server in the view, perhaps iterate over them and style them?
I found this answer here, but really didn't answer my question:
Ruby-Rails serve ftp file direct to client
(using rails 3 if it makes a difference)
You can use library links below:
http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/ftp/rdoc/index.html
http://oreilly.com/catalog/ruby/chapter/ch04.html
and you can use EventMachine https://github.com/schleyfox/em-ftp-client.
Cheers!

Adding server-side script and RSS feed to Sharepoint 2007?

I am investigating if the functionality of some CGI scripts written in Perl that we run on a web server can be migrated to our Sharepoint 2007 server (MOSS).
The CGI scripts are not complicated. Basically they display and process contents of files that resides in the network file system.
For instance one script just displays the contents of small text files that are being added to a specific folder.
These files are part of a production process and cannot be moved into a Sharepoint document archive.
The CGI scripts are being used to give an overview on what is "new in the queue" for this production process.
When the production process has finished, it removes the files from the folder. But new files may arrive to the folder at any time.
I have done some investigations and found that using a "Data View" web part would give possibilities of displaying the data in a good way.
The files need to be transformed from text to XML format, before some xslt could make it look good in a Data View WP. I guess that could be done by some kind of server-side script?
But how and where do I add such a script to Sharepoint?
Would it be a good idea implementing this as an RSS feed instead? But an RSS feed would also require a server-side script, wouldn't it?
I am new to Sharepoint development and would appreciate any useful advice.
Why not just write a Custom WebPart to read the content of those text files and display them. This way you wont be making changes to those text files.
Note : The link to custom Web Part is my blog. There are tonnes of other articles in the net :)

Customizable / Dynamic SWF generation

Wondered if anybody knows how customizable Flash swf files are made, where there appears to be a template swf that the user can then input some changes (eg text or image) and receives a newly-compiled swf file with their changes.
Some examples:
- http://flashfreezer.com/landingconfetti/index.html
Constraints:
- user receives a single output swf file that can be played with all their changes included. ie there is no reading from an xml file, or using Flashvars.
Been trying different things for a few weeks with no luck!
There are a number of ways, but generally the most common is to either use a SWF generating library (like PHP's) or through server-side compiling.
Normally, this will be a custom or proprietary library which uses the same language that the serve is running (and there are open-source libraries for this in PHP, Perl, Python, Java, C++... etc). The SWF is generated and served up with the appropriate headers so that the browser knows how to re-direct it. Often this will involve a pre-defined template which is then modified slightly for the new input. Only occasionally does this involve the manipulation of pre-generated SWF directly.
The other option is to have a command line call to the Flash IDE or the Flex compiler (and, technically, this can work for CS3 and CS4, though in a very nasty and hackish way) to generate a new version of the SWF on the fly. This is often slower, but it will generally yield a more finished feel to a product.
You could try Swiffotron. It can modify SWF files and do text replace type things on both text elements and in compiled actionscript.
Here's a swiffotron xml job file that does some text replacing.
And here's a swiffotron XML job file that modifies instances on the stage.
I didn't check the site, but the only way I can think of is to read the requirement details through flash (this can be done through plain html also) and then generate the AS files from their templates and compile them at the server side (using mxmlc or other compilers) and give back the SWF.
I get the impression that you're looking for SwfMill. SwfMill creates a swf based on an XML file that you create/define. You could use SwfMill on the server to generate a swf based on user input.

Resources