Jump to content


Photo

Probleminha Basico


  • Faça o login para participar
5 replies to this topic

#1 abc2

abc2

    Cuidado com o Narcisismo

  • Usuários
  • 546 posts
  • Sexo:Não informado
  • Localidade:Blumenau/SC

Posted 06/12/2006, 09:21

nao devia ter saido ontem a noite e bebido, to com uma baita ressaca hj e minha cabeca nao ta funcionando hahah

seguinte: to fazendo um sistema de upload de imagens e precisaria renomear o arquivo com um valor randomico... ficaria esse valor seguido do nome original da imagem

por exemplo:
92938_nome.jpg
91928_nome2.jpg
e assim por diante

ate ai td bem, ele realmente muda o valor da variavel da imagem, salva no banco td certinho com esse valor aleatorio, mas a imagem nao renomeia... tentei de diversas formas mas nao tem jeito...

alguem pode dar um help?
Function GerarChave(Valores)
Dim teste_Array(9)
teste_Array(0) = "0"
teste_Array(1) = "1"
teste_Array(2) = "2"
teste_Array(3) = "3"
teste_Array(4) = "4"
teste_Array(5) = "5"
teste_Array(6) = "6"
teste_Array(7) = "7"
teste_Array(8) = "8"
teste_Array(9) = "9"
Randomize

Do While Len(Chave) < 06
Num = teste_array(Int(9 * Rnd )) 
Chave = Chave + Num 
Loop 
GerarChave = Chave
End Function
varChave = GerarChave(6)




Server.ScriptTimeout=1000000000
On Error Resume Next
Set Upload = Server.CreateObject("ASPSmartUpload.SmartUpload")
Upload.AllowedFilesList = "gif,jpg"
Upload.MaxFileSize = 1000000
Upload.TotalMaxFileSize = 4000000
Upload.Upload
For each File in Upload.Files
If File.Size > 0 Then
imagem = varChave & "_" & File.FileName
Upload.Save("/img_produtos")

produto = request.querystring("produto_id")

sqlString = "INSERT INTO imagens"&_
			"(imagem, produto) VALUES ( '" & imagem & "','" & produto & "')"
			
Conn.Execute sqlString

Else
Response.Write "O arquivo enviado é inválido"
End if
Next
If Err Then
Response.Write "Houve um erro: " & Err.Description
End if
Set Upload = Nothing

este code está funcionando, mas qdo uso um dos comando abaixo pra renomar a imagem ele da erro
file.SaveAs("/img_produtos" & imagem)
ou
Upload.Save("/img_produtos/"&imagem)

erro:
Unable to save file

:( :(

#2 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 31/10/2017, 08:54

Buy Cefixime Online Indian Pharmacy Amoxicillin Claw Comment Se Procurer Du Viagra Sans Ordonnance buy viagra online Zithromax 600 Mg Tomar Viagra Para Durar Mas

#3 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 16/11/2017, 15:19

Prezzo Di Levitra viagra cialis Clomid Est Provames Viagra Super Dulox

#4 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 27/11/2017, 13:36

Cialis Without Presc Cialis GСÐСâСÐвÐâСÐСâРÐÐÂnstig Kaufen viagra online prescription Zithromax Pediatric Suspension Dosing Calculator
Levitra Probepackung Where To Order Legally Progesterone Website Cod Accepted cialis Buy Prevacid Black Market Predisone Comprar Cialis Por Internet Es Seguro

#5 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 29/11/2017, 08:40

Child'S Amoxicillin Dose Levitra 20mg Forum levitra for sale Propecia Nioxin Treatment Bentyl Cash Delivery For Sale
Zithromax Online Buy extra super levitra frumforum.co Comprar Bactrim Cialis Mode D'Action Paxil
Dosis Del Kamagra viagra Photo Of Keflex Viagra Generico 50 Zithromax Erythromycin
Buy Levitra Best Price The Blue Pill On Line online pharmacy Cialis 5mg Cp Lowest Cialis Prices

#6 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 09/12/2017, 19:43

Order Synthroid Levothyroxine In Uk Generic Secure Ordering Zentel Website Shipped Ups Wells Amoxicillin How To Buy cialis Prix Du Cialis Maroc




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq