Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SD stored pictures get by browser #20

Open
PirSoft opened this issue Sep 18, 2019 · 2 comments
Open

SD stored pictures get by browser #20

PirSoft opened this issue Sep 18, 2019 · 2 comments
Labels
discussion Brainstorm ideas help wanted Extra attention is needed idea A project idea

Comments

@PirSoft
Copy link

PirSoft commented Sep 18, 2019

Hi Dears;
I would like stored sd card jpg files get by browser. capture triger with GPIO similar digital camera. one push button capture image1.jpg second push capture image2.jpg .
after stored SD card i would like access with browser, get files by link
for example : http://ipaddress/jpeg/image1.jpg enter browser and ge file from sd card.

how can I do it_?

thanks. Best Regards

@raphaelbs
Copy link
Owner

That is an interesting project idea.
I believe that an example that takes a photo after pressing a button would help.

You can change the sd example project to trigger a new capture using the GPIO button.

@raphaelbs raphaelbs added discussion Brainstorm ideas help wanted Extra attention is needed idea A project idea labels Sep 26, 2019
@PirSoft
Copy link
Author

PirSoft commented Oct 1, 2019

hi

That is an interesting project idea.
I believe that an example that takes a photo after pressing a button would help.

You can change the sd example project to trigger a new capture using the GPIO button.

hi Raphaelbs;

I get image from sd car by web browser. but get onle small part of image. code at bellow. what is problem?

`

File f = SD_MMC.open("/capture.jpg", "r");
int filesize = f.size();
String WebString = "";
WebString += "HTTP/1.1 200 OK\r\n";
WebString += "Content-Type: image/jpeg\r\n";
WebString += "Content-Length: " + String(filesize) + "\r\n";
WebString += "\r\n";

char buf[1024];
int siz = f.size();
while(siz > 0) {
size_t len = std::min((int)(sizeof(buf) - 1), siz);
f.read((uint8_t )buf, len);
httpd_resp_set_type(req, "image/jpeg");
httpd_resp_send(req,(const char
)buf,len);
siz -= len;
f.close();
}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Brainstorm ideas help wanted Extra attention is needed idea A project idea
Projects
None yet
Development

No branches or pull requests

2 participants