Post Reply  Post Thread 
UI upload images
Author Message
oriobilly
Redoviti posjetitelj
**


Posts: 249
Group: Registered
Joined: Jan 2007
Status: Offline
Reputation: 5
Post: #1
UI upload images

Pozdrav

Evo već dugo Vas nisam zamarao, pa reko da se ne uspavate !!!

Ima li koja skripta koja bi preko PHP-a i ILI nečega drugog omogučila posjetiocima da uploadaju neku sliku koja bi bila vidljiva na mome Flash site-u ???

Zači da bi se preko neke skripze trebala smanjiti u rezoluciju pogodnu za Internet, uploadati na server i kao takva biti vidljiva. !!!!

Pozdrav


Divno je biti nekome nešto !!!
15-06-2008 02:45 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Gogy
____
*


Posts: 1,707
Group: Webmaster
Joined: Feb 2006
Status: Offline
Post: #2
RE: UI upload images

Ili nitko ne zna ili neće odgovorit He he
Ja ne znam flash ali...

Isprobaj ovu skriptu http://sourceforge.net/projects/yamzbrowser/

Ako nije to, onda probaj iskemijat nešto iz ovih linkova

http://www.flash-db.com/Tutorials/upload/upFiles.php
http://www.masrizal.com/index.cfm?fuseac...lashupload
http://robrosenbaum.com/flash/using-flas...p-symfony/


Pravila foruma

eBooks Network - download besplatnih e-knjiga
16-06-2008 01:36 PM
Visit this user's website Find all posts by this user Quote this message in a reply
hamferus
Forumaš
***


Posts: 352
Group: Registered
Joined: Jun 2006
Status: Offline
Reputation: 8
Post: #3
RE: UI upload images

Bok,

Baš sam ti mislio stavit flash-df.com link i onda vidim da ga je Gogy stavio.


PHOTO - http://www.hamferus.com
VIDEO - http://www.metacafe.com/f/channels/hamferus/
RC WORLD - http://rcfanatic.blogspot.com
FLASH TUTORIJALI - http://blog.hamferus.com
18-06-2008 10:36 PM
Visit this user's website Find all posts by this user Quote this message in a reply
oriobilly
Redoviti posjetitelj
**


Posts: 249
Group: Registered
Joined: Jan 2007
Status: Offline
Reputation: 5
Post: #4
RE: UI upload images

Hvala na trudu !!!

Napokon sam to nekako uspio, barem donekle uspio shvatiti ali ne baš najbolje, jer su komentari u PHP fajlu za upload izgleda Francuski.

PHP Code:
<?php

// empche la mise en cache de la page PHP

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date du pass
header("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT"); // toujours modifi
header("Cache-Control: no-cache, must-revalidate");    // HTTP/1.1
header("Pragma: no-cache");          // HTTP/1.0

$max_size 20000// 20ko
$max_width 2000;
$max_height 2000;
$dirname  'img'// chemin de destination des fichiers depuis la racine du script

/*
0 aucune erreur, fichier upload avec succs
-1 le format du fichier est incorrect
-2 la taille du fichier est incorrecte
-3 le format de l'image est incorrect
-4 la largeur de l'image est incorrecte
-5 la hauteur de l'image est incorrecte
*/

// tout d'abord s'il s'agit d'une image on recupere un tableau de caracteristiques de l'image pour les tests
if (isset($fichier)) $tab GetImageSize($fichier);

// test une erreur de taille de fichier
if ($fichier_size $max_size || $fichier_size == 0$status=-2;
// test si erreur dans la variable $fichier
else if (!$fichier || $fichier == "none"$status=-1;
else if (
strpos($fichier_name,"\\") || strpos($fichier_name"/")) $status=-1;
// test les extensions des fichiers meme si le test n'est pas tres secure ca fait un test de plus :o)
else if (!stristr($fichier_name".jpg")) $status=-1;
// si ce n'est pas un fichier txt je test si l'image est bien une image, si une personne renomme un .doc en .jpg par exemple ce test suffit a annuler l'upload
else if (!$tab[0]) $status=-3;
// test le type d'encodage du fichier pour etre bien sur de sa nature
else if (!stristr($fichier_type"jpeg")) $status=-1;
else if (
$tab[0] > $max_width$status=-4;
else if(
$tab[1] > $max_height$status=-5;
else {
    
// tout s'est droul ok, ouf enfin on peut uploader le fichier avec copy
    
copy($fichier$dirname."/".$fichier_name);
    
$status=0;
}

// voila ce que doit renvoyer la page cot serveur quelquesoit le langage
echo "<HTML><BODY><script>window.top.upLoadEnd('$browseLC',$status,'$fichier_name','".urlencode("%+datas from server: $dataLC")."')</script></HTML>";

?>


Kako promjeniti da dozvoljena velićina slike ne bude ogranićena na 20kb?
Probao sam promjeniti :
$max_size = 20000; // 20ko dodajući jednu nulu, ali ne radi ???

I još nešto ! Dali postoji mogućnost da se napravi .php fajl koji bi se automatski otvarao ako je upload uspješan i u kojeg bi se prikazale sve uploadane slike iz foldera img . Hmmm

I dali taj redirect treba napraviti u Flashu ili u php-u ?

U prilogu zipp primjera.

Pozdrav



Attached File(s)
.zip File  example.zip (Size: 22.01 KB / Downloads: 0)

Divno je biti nekome nešto !!!
19-06-2008 01:34 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Gogy
____
*


Posts: 1,707
Group: Webmaster
Joined: Feb 2006
Status: Offline
Post: #5
RE: UI upload images

To ne znam, samo evo pomoć kod francuskog Namigivanje http://translate.google.com/translate_t?sl=fr&tl=en
Google solidno prevede na eng.


Pravila foruma

eBooks Network - download besplatnih e-knjiga
19-06-2008 08:31 AM
Visit this user's website Find all posts by this user Quote this message in a reply
iggy_pop
Novi korisnik
*


Posts: 39
Group: Registered
Joined: Dec 2007
Status: Offline
Reputation: 1
Post: #6
RE: UI upload images

ili ako koristiš mozzilu, instaliraj ovu eksxtenziju http://blog.jimmyr.com/Unofficial_Google...5_2008.php

19-06-2008 10:00 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: