Comments (6)
The uploaded photos usually have the date in the filename (failing that there should also be a date in the exif metadata). In Nextcloud there is the same problem. I used to touch
the files to set them to appropriate timestamp. Here is the script I use:
#format 2021-02-18_201122_5428.mov
for i in $(find . -type f -mtime -40 );do
tstamp=$(basename "$i" | cut -d"_" -f1-2 | tr -d '_-');
echo $tstamp;
tstamp=$(echo $tstamp | sed -E 's/(.{12})(.*)/\1\.\2/g')
touch -t $tstamp "$i";
done
#confirm changes with `docker-compose exec --user www-data app php occ files:scan --path=/path/to/Camera-Uploads`
Now, I tried the same with Seafile but so far I wasn't able to change the timestamp in any file while using Seadrive Daemon in a Linux Server (no gui). Is that a limitation of Seadrive or does it happen also if I synchronize the library with Seafile client?
Please give us at least a workaround. Thank you.
from seafile-ios.
So I did a quick test and this technique seems to work for libraries/folders synchronized through Seafile Desktop Client. It is a pain to synchronize a big library just to change the timestamps so again: is there some configuration we can change to enable timestamp modification with Seadrive? Thank you
EDIT: Turns out it took a couple of minutes to synchronize the timestamp changes to the server but the previous script worked like a charm updating the timestamps through SeaDrive. More than 6000 files correctly "timestamped". Nevertheless the App should preserve the file metadata when uploading.
To clarify the actual format for iOS Photos is IMG_20161224_191347_0394.JPG
so there is a small change in the cut command. Again the complete working script:
#format IMG_20161224_191347_0394.JPG
for i in $(find . -type f -mtime -40 );do
tstamp=$(basename "$i" | cut -d"_" -f2-3 | tr -d '_-');
echo $tstamp;
tstamp=$(echo $tstamp | sed -E 's/(.{12})(.*)/\1\.\2/g')
touch -t $tstamp "$i";
done
from seafile-ios.
surprise twist: after applying the script and correcting all the timestamps, the auto upload function thinks the local file (in the iPhone) differs from the remote file (on the Seafile server) and re-uploads everything again!!!. We are talking here about near to 7000 files so yeah... my phone is on fire today.
TLDR: I take everything back about the possible workaround. There seems to be no possibility of fixing the data on the server end: the iOS Seafile app must send the real timestamp on the first place.
Pleasee fix this. Thanks
from seafile-ios.
I discovered a new workaround and I think in my case it will stay this way long term. I'll explain: I also have a remote backup in a cloud service where apparently the original timestamps are honored. In the server where Seafile runs I have both the cloud and Seadrive mounted with fuse (Seadrive). I then have a cron task in place which synchronizes (rsync -avhP ...
) the files from the cloud to Seadrive preserving timestamps and everything.
This works and I think in my case is even better because I only have to upload the files one time from my phone while the sync to Seafiles happens automatically on the server. This has also the advantage of having a backup of the small videos that the iPhone takes with the so-called "live photos" which were missing from the Seafile "Automatic Upload".
from seafile-ios.
I have the same issue.
Thanks for the workaround. I may do this too but of course would prefer not to depend on a third party cloud.
Anyone knows if the limitation comes from the iOS client or from the API (found this related issue haiwen/seafile#1456) ?
from seafile-ios.
Thanks for sharing your workaround @pandiloko - I think this may be a solution an I'll give it a try. Nevertheless, I also think, that the photos should contain the meta data to be able to sort them by the real time they where taken.
Sorting photos by the name also works at the moment, but won't work if they get renamed.
And: Its not possible to change the order by name to show the latest photos first. It would be great if we could choose between asc and desc order.
from seafile-ios.
Related Issues (20)
- Compressed photo (and screenshot) upload
- Systemwide gestue to refresh doesn't work HOT 4
- Cancelled Seafile Activity always returns "completed = true"
- Automatic photo upload - reuploading HOT 1
- Adding a new account does not show up in Files
- 希望加入iOS上传时是否把heic转换为jpg文件的开关 HOT 4
- ios客户端预览markdown文件时无法展示图片
- Background upload works only if app is open HOT 1
- Please remove translation language 'Korean (ko)' from the transifex HOT 1
- Seafile provider prevents file edits from some apps since v2.9.19 HOT 1
- Profile picture not updated
- iOS Shortcuts cannot access files
- Camera auto upload: Difficulty uploading large (> 2gb) video files
- Accountsettings are not editable
- Client sends bad request
- Are there any updates coming for iOS? HOT 1
- SeafilePro - no available certificates on login
- Crashes on login HOT 1
- Problems with Media Files in Encrypted Libraries
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seafile-ios.