I have an app that allows the upload of images. It has reached its file storage limit other times, so i created a script that uploads the image files from the glideapps storage to our own file storage and then inserts the new location in a separate URL field in that table. I then go through and manually delete the entire contents of the image field in that table.
My understanding is that removing the references to these image files should cause them to disappear from file storage, but that doesn’t seem to be happening this time.
This was definitely working in the past as once I deleted the contents of the image field the file storage warning would go away. This time however the warning persists.
Can anyone suggest a reason why this might not be working, or what else might be causing this?
1 Like
I think the files are deleted within 30 days, so it’s not immediate, but yes I think your storage should reflect a change immediately if you remove the url.
Is there a chance that you have duplicate tables, maybe a duplicate app, that would be referencing old urls?
2 Likes
Thank you for your suggestion, Jeff_Hager, it did lead to a solution.
Something for others who experience this to look into if you habitually create backup versions of your apps, as is recommended since there is no db backup system, and no source control, with glideapps:
I had already gone through all of my backup copies and checked each of them to make sure there were no images in any of them. In fact I had just gone through and double-checked them all before posting this question. Then, since I had no other ideas of how to resolve the problem, I began deleting my backups starting from the oldest.
Two interesting things happened:
-
With each backup I deleted I gained a few MB of space. No idea why, because again, none of them had any images stored in them. The only thing I could think of is that there is a feature in the app that allows users to export search results as a CSV, which does store a reference to the file in a field. Given that there are only a tiny number of users (2 or 3) with the ability to use this feature, I doubt that could add up to 2 or 3 MB, but… maybe?
-
One of the backups suddenly freed up 400MB. This was both surprising and confusing, because I had just checked it to make sure it had no images in it. My best guess here is that it is possible for a bug to occur where the references persist in the app after the images have been deleted.
Anyway, the problem is resolved for now, but I don’t really have a satisfactory answer as to what was causing it.
3 Likes
Interesting findings. I wonder if the 2 or 3mb is attributed to the small amount of space the app takes up itself. Not sure…
I have complained in the past that duplicate apps do in fact duplicate the amount of file storage taken up. For example, I have an app that takes up 3gb of space, but if I duplicate the app, I’m all of a sudden using 6gb. What bothers me is that both apps are pointing to the exact same file url locations, but Glide will count each one twice. I’m only using 3gb of storage, but Glide insists that it’s 6gb. It’s especially compounded if you have multiple duplicates and backups. I really wish that Glide would fix this issue. It really starts to cause problems if it puts you over your storage limit, when in reality you are not even close to being over the limit.
As for the 400mb clearing up for you…who knows. I wonder if you maybe had a duplicate table in that app that you were overlooking. I wouldn’t think it’s any type of caching, but can’t rule that out either.
In any case, thanks for providing an update.
3 Likes