Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
20240528-BJava
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
20240528-BJava
Commits
b62e53ef
Commit
b62e53ef
authored
Jun 13, 2024
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Obsługa zdjęć - upload
parent
9cee75e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
photo_upload.jsp
PC24-SklepWeb/src/main/webapp/photo_upload.jsp
+34
-0
No files found.
PC24-SklepWeb/src/main/webapp/photo_upload.jsp
0 → 100644
View file @
b62e53ef
<
%@
page
language=
"java"
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%
>
<
%@
taglib
prefix=
"c"
uri=
"jakarta.tags.core"
%
>
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
Edycja zdjęcia
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"styl.css"
>
</head>
<body>
<h1>
Wgraj zdjęcie produktu
</h1>
<div>
Produkt nr
<strong>
${param.productId}
</strong></div>
<div>
Aktualne zdjęcie:
<br/>
<img
class=
"photo"
src=
"photo?productId=${param.productId}"
alt=
"Brak zdjęcia"
>
</div>
<
%
--
action
powoduje
,
ż
e
zapytanie
z
formularza
jest
wysy
ł
ane
pod
podany
adres
,
a
nie
bie
żą
cy
.
Aby
wys
ł
a
ć
zawarto
ść
pliku
(
a
nie
tylko
jego
nazw
ę),
nale
ż
y
ustawi
ć
enctype
jak
poni
ż
ej
.
Sam
plik
to
pole
formularza
typu
file
;
opr
ó
cz
niego
mog
ą
by
ć
inne
„
zwyk
ł
e
”
pola
.
Odpowiednio
trzeba
to
te
ż
obs
ł
u
ż
y
ć
w
serwlecie
-
patrz
klasa
DoUploadPhoto
.
--
%
>
<form
id=
"photo-form"
method=
"post"
action=
"photo_upload"
enctype=
"multipart/form-data"
>
<input
type=
"hidden"
name=
"productId"
value=
"${param.productId}"
>
<label
for=
"plik"
>
Wybierz plik ze zdjęciem
</label>
<input
id=
"plik"
type=
"file"
name=
"plik"
accept=
"image/jpeg"
>
<br>
<button>
Wyślij
</button>
</form>
<p>
[
<a
href=
"products9.jsp"
>
powrót do listy produktów
</a>
]
</p>
<p>
[
<a
href=
"index.html"
>
powrót do spisu treści
</a>
]
</p>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment