Bei mir geht es inzwischen. Ich hatte allerdings versucht das Teil mit
der 1.2 cake einzusetzen und dort kann es nicht gehen, weil die n�tigen
Felder nicht mehr von cake gef�llt werden, auf die die Uploader Componente
zugreift.
Wenn Du also die 1.2 hast, kann ich dir gern die neue Version schicken.
Gruss
Siegfried
Am 14.06.07 schrieb MaDo <[EMAIL PROTECTED]>:
>
> Hallo!
>
> Ich habe gestern auch einige Stunden damit zugebracht, aber auch bei
> mir erscheint die Uploadanzeige etc. nicht. Das Uploadformular wird
> zwar durch die "Choose File" und "Upload" Links ersetzt, ich kann auch
> Dateien ausw�hlen und das Script sagt mir, wenn der Dateityp nicht
> erlaubt oder eine Datei zu gro� ist, das war es dann aber auch.
> Das Flash selbst wird ja auch gar nicht angezeigt, das dient nur f�r
> den Upload im selbst im Hintergrund. Die Fortschrittsanzeige etc. wird
> per Ajax erzeugt. Mein Firebug Plugin in Firefox sagt mir auch, dass
> das Flash geladen wurde, es gibt auch keine JS-Fehler - geht aber
> trotzdem nicht ...
>
> Mein View sieht �brigens so aus:
>
> -----------------------------
> <?php echo $javascript->codeBlock("
> var swfupload_url = '" . $html->url('/js/swfupload/
> SWFUpload.swf') . "';
> var upload_url = '" . $html->url('/files/upload') . "';
> var file_info_url = '" . $html->url('/files/info') . "';"); ?>
> <?php echo $javascript->link('swfupload/SWFUpload'); ?>
> <style type="text/css">
>
> .swfuploadbtn {
> display: block;
> width: 100px;
> padding: 0 0 0 20px;
> }
>
>
>
> .cancelbtn {
> display: block;
> width: 16px;
> height: 16px;
> float: right;
>
> }
>
> #cancelqueuebtn {
> display: block;
>
>
> margin: 10px 0;
> }
>
> #SWFUploadFileListingFiles ul {
> margin: 0;
> padding: 0;
> list-style: none;
> }
>
> .SWFUploadFileItem {
>
> display: block;
> width: 230px;
> height: 70px;
> float: left;
> background: #eaefea;
> margin: 0 10px 10px 0;
> padding: 5px;
>
> }
>
> .fileUploading { background: #fee727; }
> .uploadCompleted { background: #d2fa7c; }
> .uploadCancelled { background: #f77c7c; }
>
> .uploadCompleted .cancelbtn, .uploadCancelled .cancelbtn {
> display:
> }
>
> span.progressBar {
> width: 200px;
> display: block;
> font-size: 10px;
> height: 4px;
> margin-top: 2px;
> margin-bottom: 10px;
> background-color: #CCC;
> }
>
> </style>
>
>
> <script type="text/javascript">
>
>
> var swfu;
>
> window.onload = function() {
>
> swfu = new SWFUpload({
> upload_script : "/mycake/filesup/upload",
> target : "SWFUploadTarget",
> flash_path : "/mycake/js/swfupload/SWFUpload.swf",
> allowed_filesize : 1000, // 1000kb
> allowed_filetypes : "*.jpg;*.gif;*.pdf;*.doc; *.zip",
> allowed_filetypes_description : "Images",
> browse_link_innerhtml : ' Choose Files<br> ',
> upload_link_innerhtml : " Upload Files",
> browse_link_class : "swfuploadbtn browsebtn",
> upload_link_class : "swfuploadbtn uploadbtn",
> flash_loaded_callback : 'swfu.flashLoaded',
> upload_file_queued_callback : "fileQueued",
> upload_file_start_callback : 'uploadFileStart',
> upload_progress_callback : 'uploadProgress',
> upload_file_complete_callback : 'uploadFileComplete',
> upload_file_cancel_callback : 'uploadFileCancelled',
> upload_queue_complete_callback : 'uploadQueueComplete',
> upload_error_callback : 'uploadError',
> upload_cancel_callback : 'uploadCancel',
> auto_upload : false
>
> });
> swfu.loadUI(); //
> };
> </script>
>
>
> <div id="SWFUploadTarget"> <h4 id="queueinfo">Queue is empty</h4>
>
> <div id="SWFUploadFileListingFiles"></div>
> <form action="<?php echo $html->url('/filesup/upload') ?>"
> method="post" enctype="multipart/form-data" onsubmit="return false" >
> <input type="file" name="Filedata" />
> <input type="submit" value="Upload" />
> </form>
> </div>
>
>
> -----------------------------------
> und so der controller:
> -----------------------------------
> <?php
> class FilesupController extends AppController {
> var $name = 'Filesup';
> var $helpers = array('Html','Javascript','Ajax');
> var $components = array('SwfUpload');
> function index() {
>
>
>
> }
> function upload () {
>
>
>
> if (isset($this->params['form']['Filedata'])) {
>
> // upload the file
>
> // use these to configure the upload path, web path, and
> overwrite settings if necessary
> $this->SwfUpload->uploadpath = 'files' . DS . 'upload';
> $this->SwfUpload->webpath = 'files/upload/';
> $this->SwfUpload->overwrite = true; //by default,
> SwfUploadComponent does NOT overwrite files
> //
> if ($this->SwfUpload->upload()) {
> // save the file to the db, or do whateve ryou want to
> do with the data
> $this->params['form']['Filedata']['name'] = $this-
> >SwfUpload->filename;
> $this->params['form']['Filedata']['path'] = $this-
> >SwfUpload->webpath;
> $this->params['form']['Filedata']['fspath'] = $this-
> >SwfUpload->uploadpath . $this->SwfUpload->filename;
> $this->data['File'] = $this->params['form']
> ['Filedata'];
>
> if (!($file = $this->File->save($this->data))){
> $this->Session->setFlash('Database save failed');
> } else {
> $this->Session->setFlash('File Uploaded: ' . $this-
> >SwfUpload->filename . '; Database id is ' . $this->File-
> >getLastInsertId() . '.');
> }
> } else {
> $this->Session->setFlash($this->SwfUpload-
> >errorMessage);
> }
> }
> }
>
> function open($id) {
> $file = $this->get($id);
> if (isset($file)) {
> $this->redirect($file['File']['path'] . $file['File']
> ['name']);
> exit();
> }
> }
>
> function get($id) {
> //get file info
> $file = $this->File->findById($id);
> return $file;
> }
> }
> ?>
> ---------------------------------------
>
> Hat schon jemand neue Erkenntnisse?
>
> MaDo
>
> On 14 Mai, 07:58, "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
> > danke f�r die antwort
> >
> > hmm ok mal schauen irgentwie muss das ja laufen.
> >
> > Mfg
> > Sebastian
>
>
> >
>
--
Siegfried Hirsch
hhS - Welserstr. 1 - 81373 M�nchen - (089) 5484 3564 - skype:shirsch
http://gadgetgui.de / http://www.rss-blogger.de
http://www.newsbee.de NewsBee 2 - customized RSS solutions
--~--~---------~--~----~------------~-------~--~----~
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google Groups-Gruppe
"CakePHP-de für deutsche CakePHP Entwickler".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an [email protected]
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an [EMAIL
PROTECTED]
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/cakephp-de?hl=de
-~----------~----~----~----~------~----~------~--~---