Fakultas Ilmu Komputer UI

Commit ad56e56a authored by Gregorius Aprisunnea's avatar Gregorius Aprisunnea
Browse files

[GREEN] adding implementation for fileManagementUtil.py

parent 9caf0520
def get_random_filename():
import tempfile, random, datetime, string, hashlib,os
import PIL.Image as Image
def get_random_filename(f_name):
ext = f_name.split(".")[-1]
name = ''.join(random.choices(string.ascii_lowercase , k=4))
name += hashlib.md5((datetime.datetime.now().isoformat() + f_name).encode()).hexdigest()
name = name + "." + ext
return name
def remove_image_exifdata(f_path):
img = Image.open(f_path)
def remove_image_exifdata():
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment