从 SFTP 服务器读取图像 EXIF 数据,无需下载文件 [英] Reading image EXIF data from SFTP server without downloading the file

查看:68
本文介绍了从 SFTP 服务器读取图像 EXIF 数据,无需下载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个从 SFTP 服务器下载文件的脚本.但是,每个文件夹中有 10k 个文件(每个文件约 5MB),我只想下载相隔 12 小时的文件.(例如,12:00 时间和 00:00).

I'm writing a script that downloads files from a SFTP server. However, there are 10k files (~5MB per file) in each folder, and I only want to download files that are, say, 12 hours apart. (eg. 12:00 time and 00:00).

但我似乎只能读取上次修改的日期,而不是创建日期.这个日期似乎是隐藏的,直到我在本地拥有该文件.我有一个替代策略,但不如在第一次下载时获得正确的文件那么干净.

But I seem to only be able to read the date for last modification, not creation. This date seems hidden until I have the file locally. I have an alternative strategy, but it is not as clean as getting the right files on the first download.

推荐答案

JPEG EXIF 元数据是文件内容的一部分,而不是文件元数据的一部分,就文件系统/FTP 而言.所以它不是目录列表的一部分,至少我知道的任何 SFTP 服务器都不是.

JPEG EXIF metadata is part of the file contents, not part of file metadata, as far as filesystem/FTP is concerned. So it's not a part of a directory listing, at least not with any SFTP server I know of.

如果不下载 JPEG 文件,您将无法检索它.或者至少不下载包含 EXIF 的文件部分.

You cannot retrieve it without downloading the JPEG file. Or at least not without downloading the part of the file that contains the EXIF.

相关问题:无需在 Python 中下载文件即可检查存储在 FTP 服务器上的图像的纵横比

这篇关于从 SFTP 服务器读取图像 EXIF 数据,无需下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆